diff --git a/src/features.coffee b/src/features.coffee index 4752c03ae..2fc6b2b34 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -3199,7 +3199,10 @@ ImageExpand = post = Get.postFromNode @ $.rm @ delete post.file.fullImage - unless $.hasClass post.file.thumb, 'expanding' + # Images can error: + # - before the image started loading. + # - after the image started loading. + unless $.hasClass(post.file.thumb, 'expanding') or $.hasClass post.nodes.root, 'expanded-image' # Don't try to re-expend if it was already contracted. return ImageExpand.contract post