indutny / node-nat-upnp

NAT port mapping via UPnP
147 stars 59 forks source link

description field become an empty object if upnp port-mapping description is an empty string #35

Open MelvinTo opened 6 years ago

MelvinTo commented 6 years ago

please check out description below, looks like an xml2js bug?

node-nat-upnp version 1.1.1

i think the xml2js dependency should be updated. xml2js "0.4.19" doesn't have this issue.

> var natUpnp = require('nat-upnp');
undefined
> var client = natUpnp.createClient();
undefined
> client.getMappings(function(err, results) { console.log(results) })
undefined
[ { public: { host: '', port: 13760 },
    private: { host: '192.168.50.48', port: 1080 },
    protocol: 'tcp',
    enabled: true,
    description: {},
    ttl: 0,
    local: false } ]