« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/html.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/html.js b/src/util/html.js
index 073bdaa..dea346c 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)) {