diff options
author | Olivier Paroz <github@oparoz.com> | 2015-10-06 12:36:22 +0300 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-10-06 12:36:22 +0300 |
commit | de642bc21f90a8fc4f4a1f7e35025970c3e889b0 (patch) | |
tree | 1519c7d6ecacdefd91910b5d0494229f96082e3e | |
parent | 0a9e4b3f91e06d7f50ffe9214e38b765c01c87a6 (diff) |
Force Chrome to reload images after image.onerror
-rw-r--r-- | js/thumbnail.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/thumbnail.js b/js/thumbnail.js index 0353d6e5..92398722 100644 --- a/js/thumbnail.js +++ b/js/thumbnail.js @@ -132,7 +132,8 @@ function Thumbnail (fileId, square) { }; thumb.image.onerror = function () { thumb.valid = false; - thumb.image.src = Thumbnails._getMimeIcon(preview.mimetype); + var icon = Thumbnails._getMimeIcon(preview.mimetype); + setTimeout(function(){ thumb.image.src = icon; }, 0); }; if (thumb.status === 200) { |