From 1f2e25b3a2cfc39129331f97d10569c767e07197 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Thu, 30 Apr 2020 10:10:27 -0700 Subject: [PATCH] Fix Gallery 'Stretch to Fit' on sites with multifile posting. --- src/Images/Gallery.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index a05fe64d8..ff2299bf6 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -341,7 +341,7 @@ Gallery = {current, frame} = Gallery.nodes {style} = current - if Conf['Stretch to Fit'] and (dim = g.posts.get(current.dataset.post)?.file.dimensions) + if Conf['Stretch to Fit'] and (dim = g.posts.get(current.dataset.post)?.files[+current.dataset.file].dimensions) [width, height] = dim.split 'x' containerWidth = frame.clientWidth containerHeight = doc.clientHeight - 25