« get me outta code hell

content: transformContent: fix undefined attributes - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-12-30 17:27:46 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-12-30 17:27:46 -0400
commit90f97ce0b23c588ef149267a14f9ee0f8dffa9e8 (patch)
tree7624472e3ade5decc33cb3e69530456a6c1f25d7 /src
parent897918a65f452922b9ea99be20fb1a14daf9c264 (diff)
content: transformContent: fix undefined attributes
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/transformContent.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js
index 151c2c2e..52fe0024 100644
--- a/src/content/dependencies/transformContent.js
+++ b/src/content/dependencies/transformContent.js
@@ -370,7 +370,9 @@ export default {
                 inline: true,
                 data:
                   html.tag('img',
-                    {src, width, height},
+                    src && {src},
+                    width && {width},
+                    height && {height},
 
                     pixelate &&
                       {class: 'pixelate'}),