diff options
author | Kulak <sergei.gnezdov@gmail.com> | 2018-03-05 11:37:45 +0300 |
---|---|---|
committer | Guillermo Guerrero Ibarra <wolf.fox1985@gmail.com> | 2018-03-05 11:37:45 +0300 |
commit | 1968d9430a4b38d193d883cc532fd343f8d8e136 (patch) | |
tree | 511ab5f7840af787ee48b352fc17363070aaa002 /static | |
parent | f2f2c4fe4612ca8698692b547cbb6c960a1b2c82 (diff) |
fix for images not displayed in list (#146)
issue is described in
https://github.com/devcows/hugo-universal-theme/issues/142
Reason: image height is set, when image has not been loaded yet.
Don't set height if image height is unknown.
Diffstat (limited to 'static')
-rw-r--r-- | static/js/front.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/static/js/front.js b/static/js/front.js index 5f35807..9e62ae7 100644 --- a/static/js/front.js +++ b/static/js/front.js @@ -221,7 +221,9 @@ function counters () { function pictureZoom () {
$('.product .image, .post .image, .photostream div').each(function () {
var imgHeight = $(this).find('img').height()
- $(this).height(imgHeight)
+ if (imgHeight) {
+ $(this).height(imgHeight)
+ }
})
}
|