Skip to content

Commit

Permalink
Check undefined param too as null
Browse files Browse the repository at this point in the history
  • Loading branch information
francescogabbrielli committed May 16, 2021
1 parent 698d156 commit 6c7ce0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/js2xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6c7ce0f

Please sign in to comment.