From bd2a83bf507d3f250d8ffdd4216f057e37088a7f Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 13 Apr 2024 15:45:29 -0300 Subject: content: image: refactor originalDimensions variable names --- src/content/dependencies/image.js | 8 +++----- 1 file 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 -- cgit 1.3.0-6-gf8a5