diff --git a/src/lib/js2xml.ts b/src/lib/js2xml.ts index 0ee38ce..4eb3ff9 100644 --- a/src/lib/js2xml.ts +++ b/src/lib/js2xml.ts @@ -109,7 +109,7 @@ export class Js2xml { * Convert a javascript object to a valid xmlrpc value (as xml element). */ convert(doc:Document, input:any):Node { - const type = input!==null ? + const type = input!==null && (typeof input!=="undefined") ? Object.prototype.toString.call(input).slice(8, -1).toLowerCase() : 'nil' let method = this.js2xmlMethod['string'] try {