« get me outta code hell

content: image: drop width === height condition for willSquare - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-31 20:12:50 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-31 20:12:50 -0300
commit639fad33c79907dd158df06f0009e59691354a7b (patch)
tree759bb1ee5c8fe65c03176d5526718b2e7ee29908 /src/content
parent2d78de1bed2864e5496068e9466f2359c86d5194 (diff)
content: image: drop width === height condition for willSquare
See issue #478.
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/image.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js
index b2735a60..b1f02819 100644
--- a/src/content/dependencies/image.js
+++ b/src/content/dependencies/image.js
@@ -131,15 +131,8 @@ export default {
       !isMissingImageFile &&
       !empty(contentWarnings);
 
-    const hasBothDimensions =
-      !!(slots.dimensions &&
-         slots.dimensions[0] !== null &&
-         slots.dimensions[1] !== null);
-
     const willSquare =
-      (hasBothDimensions
-        ? slots.dimensions[0] === slots.dimensions[1]
-        : slots.square);
+      slots.square;
 
     const imgAttributes = html.attributes([
       {class: 'image'},