« get me outta code hell

html: aggressively skip blank nice attributes when inspecting tag - 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:52:35 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-03 20:45:45 -0400
commit6447a9ed99e0bc359c146517f47f298e75469a60 (patch)
tree8192648de33759126f0b7862dde38646b248956a
parent3cb824170b8deb422f58c782d31c3bcdca5dd391 (diff)
html: aggressively skip blank nice attributes when inspecting tag
-rw-r--r--src/util/html.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/html.js b/src/util/html.js
index 1a5d1a00..040714ef 100644
--- a/src/util/html.js
+++ b/src/util/html.js
@@ -487,6 +487,9 @@ export class Tag {
       if (this.attributes.has(attribute)) {
         const value = this.attributes.get(attribute);
 
+        if (!value) continue;
+        if (Array.isArray(value) && empty(value)) continue;
+
         let string;
         let suffix = '';