From 17e473fda55b7637ed36b6bf6d00ed60cbc9af99 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 19 Sep 2017 17:52:19 -0700 Subject: [PATCH] upnp: minor. --- lib/net/upnp.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/net/upnp.js b/lib/net/upnp.js index 7a8293ca..85ec40de 100644 --- a/lib/net/upnp.js +++ b/lib/net/upnp.js @@ -333,6 +333,7 @@ function UPNPService(options) { UPNPService.prototype.createRequest = function createRequest(action, args) { const type = JSON.stringify(this.serviceType); + let params = ''; for (const [key, value] of args) { @@ -605,14 +606,14 @@ XMLElement.prototype._collect = function _collect(name, result) { */ XMLElement.prototype.find = function find(name) { - for (let child of this.children) { + for (const child of this.children) { if (child.type === name) return child; - child = child.find(name); + const desc = child.find(name); - if (child) - return child; + if (desc) + return desc; } return null;