Skip to content

Commit

Permalink
Bugfix. Handle null and undefined values.
Browse files Browse the repository at this point in the history
jcbrand committed Dec 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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
@@ -102,7 +102,7 @@ export class Stanza extends Builder {
.join('')
: value instanceof Stanza || value instanceof Builder
? value
: xmlescape(value.toString()))
: xmlescape((value ?? '').toString()))
);
}, '')
.trim();

0 comments on commit 715a036

Please sign in to comment.