Skip to content

Commit d1b11f5

Browse files
nikkufake-join[bot]
authored andcommitted
chore: improve formatting of namespace hint
1 parent 46523dc commit d1b11f5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/write.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -500,12 +500,13 @@ ElementSerializer.prototype.parseGenericAttributes = function(element, attribute
500500
try {
501501
self.addAttribute(self.nsAttributeName(attr.name), attr.value);
502502
} catch (e) {
503-
/* global console */
504503

505-
console.warn(
506-
'missing namespace information for ',
507-
attr.name, '=', attr.value, 'on', element,
508-
e);
504+
// eslint-disable-next-line no-undef
505+
typeof console !== 'undefined' && console.warn(
506+
`missing namespace information for <${
507+
attr.name
508+
}=${ attr.value }> on`, element, e
509+
);
509510
}
510511
});
511512
};

0 commit comments

Comments
 (0)