diff --git a/plugins/template-function-xml/src/index.ts b/plugins/template-function-xml/src/index.ts index fdb32b4a..ed87c3a8 100755 --- a/plugins/template-function-xml/src/index.ts +++ b/plugins/template-function-xml/src/index.ts @@ -14,8 +14,9 @@ export const plugin: PluginDefinition = { try { const doc = new DOMParser().parseFromString(String(args.values.input), 'text/xml'); let result = xpath.select(String(args.values.query), doc, false); + console.log("RESULT", result); if (Array.isArray(result)) { - return String(result.map(c => String(c.firstChild))[0]); + return String(result.map(c => String(c.firstChild))[0] ?? ''); } else if (result instanceof Node) { return String(result.firstChild); } else {