« get me outta code hell

html: fix mutable: false not actually receiving original attributes - 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:
author(quasar) nebula <qznebula@protonmail.com>2024-01-01 20:25:17 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-01 20:25:17 -0400
commit86be9294a09f947adcbda35c7a0050f3c087c918 (patch)
treee9f1820aa829950fb91f1e59256309093d2a5dcc /src/util
parent1fdbc0d9fde7205a04ee98f064bdc8f12867b788 (diff)
html: fix mutable: false not actually receiving original attributes
Diffstat (limited to 'src/util')
-rw-r--r--src/util/html.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/util/html.js b/src/util/html.js
index 9221256d..b5f6e70f 100644
--- a/src/util/html.js
+++ b/src/util/html.js
@@ -1228,11 +1228,12 @@ export class Template {
         return blankAttributes();
       }
 
-      if (
-        providedValue instanceof Attributes &&
-        description.mutable
-      ) {
-        return providedValue.clone();
+      if (providedValue instanceof Attributes) {
+        if (description.mutable) {
+          return providedValue.clone();
+        } else {
+          return providedValue;
+        }
       }
 
       return new Attributes(providedValue);