Don't try to re-expand an image on download error if we already contracted it.

This commit is contained in:
Nicolas Stepien 2013-02-14 09:54:33 +01:00
parent 7326caf438
commit cd7926d45b
2 changed files with 8 additions and 2 deletions

View File

@ -3555,8 +3555,11 @@
error: function() {
var URL, post, src, timeoutID;
post = Get.postFromNode(this);
ImageExpand.contract(post);
$.rm(this);
ImageExpand.contract(post);
if (this.hidden) {
return;
}
src = this.src.split('/');
if (!(src[2] === 'images.4chan.org' && (URL = Redirect.image(src[3], src[5])))) {
if (g.DEAD) {

View File

@ -2183,8 +2183,11 @@ ImageExpand =
error: ->
post = Get.postFromNode @
ImageExpand.contract post
$.rm @
ImageExpand.contract post
if @hidden
# Don't try to re-expend if it was already contracted.
return
src = @src.split '/'
unless src[2] is 'images.4chan.org' and URL = Redirect.image src[3], src[5]
return if g.DEAD