upnp: minor.
This commit is contained in:
parent
991213d303
commit
17e473fda5
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user