« get me outta code hell

html: allow arrays in attribute addition values (recursively) - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-12-31 22:21:03 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-01 15:19:33 -0400
commitdc52cf09944d3b7413ce79a4a9019815c73febb9 (patch)
treea3bc41d93c68f387dccacf9a747e9868d9b05dd6
parent88f4f42fa5ced5b99d932f524ef3af3347ed6899 (diff)
html: allow arrays in attribute addition values (recursively)
-rw-r--r--src/util/html.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/html.js b/src/util/html.js
index 2e3204f4..7fd2bcfe 100644
--- a/src/util/html.js
+++ b/src/util/html.js
@@ -1378,7 +1378,8 @@ export const isAttributeKey =
 export const isAttributeValue =
   oneOf(
     isString, isNumber, isBoolean, isArray,
-    isTag, isTemplate);
+    isTag, isTemplate,
+    validateArrayItems(item => isAttributeValue(item)));
 
 export const isAttributesAdditionPair = pair => {
   isArray(pair);