Commit 9bd6c41a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'commit-image-branch' into 'master'

Fixed JS issue with diff image loading

Fixes #1323

Whilst I couldn't reproduce the error locally, I did manage to get the same JS error message that was in the live env.

See merge request !463
parents 7e51ec4f 1989b667
...@@ -119,8 +119,9 @@ class @ImageFile ...@@ -119,8 +119,9 @@ class @ImageFile
requestImageInfo: (img, callback) -> requestImageInfo: (img, callback) ->
domImg = img.get(0) domImg = img.get(0)
if domImg.complete if domImg
callback.call(this, domImg.naturalWidth, domImg.naturalHeight) if domImg.complete
else
img.on 'load', =>
callback.call(this, domImg.naturalWidth, domImg.naturalHeight) callback.call(this, domImg.naturalWidth, domImg.naturalHeight)
else
img.on 'load', =>
callback.call(this, domImg.naturalWidth, domImg.naturalHeight)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment