Skip to content

Commit

Permalink
Bugfix. Handle null and undefined values.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Dec 21, 2024
1 parent 2dec7f8 commit 715a036
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stanza.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class Stanza extends Builder {
.join('')
: value instanceof Stanza || value instanceof Builder
? value
: xmlescape(value.toString()))
: xmlescape((value ?? '').toString()))
);
}, '')
.trim();
Expand Down

0 comments on commit 715a036

Please sign in to comment.