« get me outta code hell

content: image: refactor originalDimensions variable names - 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>2024-04-13 15:45:29 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-04-13 15:47:35 -0300
commitbd2a83bf507d3f250d8ffdd4216f057e37088a7f (patch)
treeb77109f908227cfcc16d791fd5f06262f6eb19fe
parentd8b766ddf82316727a6f8fad6e3df4e470d8fa9b (diff)
content: image: refactor originalDimensions variable names
-rw-r--r--src/content/dependencies/image.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js
index 93e76583..6b24f386 100644
--- a/src/content/dependencies/image.js
+++ b/src/content/dependencies/image.js
@@ -235,11 +235,9 @@ export default {
           to('thumb.path', mediaSrcJpeg);
       }
 
-      const dimensions = getDimensionsOfImagePath(mediaSrc);
-      const availableThumbs = getThumbnailsAvailableForDimensions(dimensions);
-
-      const [width, height] = dimensions;
-      const originalLength = Math.max(width, height)
+      const originalDimensions = getDimensionsOfImagePath(mediaSrc);
+      const availableThumbs = getThumbnailsAvailableForDimensions(originalDimensions);
+      const originalLength = Math.max(originalDimensions[0], originalDimensions[1]);
 
       const fileSize =
         (willLink && mediaSrc