From 715a036ebbbcffb16b379698a2e5c8f9fe7fe8b1 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Sat, 21 Dec 2024 16:32:45 +0200 Subject: [PATCH] Bugfix. Handle `null` and `undefined` values. --- src/stanza.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stanza.js b/src/stanza.js index 3944fa6..e7f1bb8 100644 --- a/src/stanza.js +++ b/src/stanza.js @@ -102,7 +102,7 @@ export class Stanza extends Builder { .join('') : value instanceof Stanza || value instanceof Builder ? value - : xmlescape(value.toString())) + : xmlescape((value ?? '').toString())) ); }, '') .trim();