We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b32f87a commit 6ae4891Copy full SHA for 6ae4891
lib/js2xml.js
@@ -12,6 +12,10 @@ function escapeSingleQuotes (value) {
12
13
function stringifyAttribute (attrs, key, keepDoubleQuotes) {
14
const value = attrs[key]
15
+ if (typeof value !== 'string') {
16
+ console.error('invalid attribute type:', attrs, key)
17
+ return `${key}=''`
18
+ }
19
try {
20
if (keepDoubleQuotes) {
21
return `${key}='${escapeSingleQuotes(value)}'`
0 commit comments