Fixed JS issue with diff image loading

This commit is contained in:
Phil Hughes 2015-03-26 21:08:17 +00:00
parent 090f2344ec
commit 1989b66734
1 changed files with 5 additions and 4 deletions

View File

@ -119,8 +119,9 @@ class @ImageFile
requestImageInfo: (img, callback) ->
domImg = img.get(0)
if domImg.complete
callback.call(this, domImg.naturalWidth, domImg.naturalHeight)
else
img.on 'load', =>
if domImg
if domImg.complete
callback.call(this, domImg.naturalWidth, domImg.naturalHeight)
else
img.on 'load', =>
callback.call(this, domImg.naturalWidth, domImg.naturalHeight)