diff options
author | Phil Hughes <theephil@gmail.com> | 2015-03-26 21:08:17 +0000 |
---|---|---|
committer | Phil Hughes <theephil@gmail.com> | 2015-03-26 21:08:17 +0000 |
commit | 1989b66734bac2b9db38512a0a32b8af98d6f69f (patch) | |
tree | 0fa5a0db95f9784cc0103d6c9212787d3b0a9e3a /app | |
parent | 090f2344ecb6631b20df5853045536f1eb0589d3 (diff) | |
download | gitlab-ce-1989b66734bac2b9db38512a0a32b8af98d6f69f.tar.gz |
Fixed JS issue with diff image loading
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/commit/image-file.js.coffee | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/assets/javascripts/commit/image-file.js.coffee b/app/assets/javascripts/commit/image-file.js.coffee index 9e5f49b1f69..9c723f51e54 100644 --- a/app/assets/javascripts/commit/image-file.js.coffee +++ b/app/assets/javascripts/commit/image-file.js.coffee @@ -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) |