From 179888d663f90c0adafb1945e78e93e49576f909 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 7 Dec 2018 19:51:00 -0800 Subject: [PATCH] Skip thumbnails not in a post (e.g. cached threads in vichan overboard infinite scroll). --- 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 33660ec3f..cbd881282 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -83,7 +83,7 @@ Gallery = $.on window, 'resize', Gallery.cb.setHeight for postThumb in $$ Site.selectors.file.thumb - post = Get.postFromNode postThumb + continue unless (post = Get.postFromNode postThumb) continue unless post.file?.thumb Gallery.generateThumb post # If no image to open is given, pick image we have scrolled to.