From 3cee0f5db2e3985b50c323aeb61ad34d2efb8f1b Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 24 Mar 2013 22:31:39 +0100 Subject: [PATCH] Fix bug where an expanded image would error and never contract or expand again. --- src/features.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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