upnp: minor.

This commit is contained in:
Christopher Jeffrey 2017-09-19 17:52:19 -07:00
parent 991213d303
commit 17e473fda5
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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;