diff options
-rw-r--r-- | src/util/html.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/html.js b/src/util/html.js index 073bdaab..dea346c5 100644 --- a/src/util/html.js +++ b/src/util/html.js @@ -130,6 +130,10 @@ export function blank() { return []; } +export function blankAttributes() { + return new Attributes(); +} + export function tag(tagName, ...args) { const lastArg = args.at(-1); @@ -477,7 +481,7 @@ export class Tag { const lines = []; const niceAttributes = ['id', 'class']; - const attributes = new Attributes(); + const attributes = blankAttributes(); for (const attribute of niceAttributes) { if (this.attributes.has(attribute)) { |