From b2bfeb5966397cc5ee3f89d707117bda3b184f05 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Fri, 3 Jan 2025 17:17:39 +0100 Subject: [PATCH] fix silly --- pdf2htmlEX/share/pdf2htmlEX.js.in | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pdf2htmlEX/share/pdf2htmlEX.js.in b/pdf2htmlEX/share/pdf2htmlEX.js.in index fc2f6686..0f79f2e0 100644 --- a/pdf2htmlEX/share/pdf2htmlEX.js.in +++ b/pdf2htmlEX/share/pdf2htmlEX.js.in @@ -342,20 +342,16 @@ Viewer.prototype = { for (var i = 0; i < images.length; i++) { var image = images[i]; (function(image) { - image.addEventListener('load', function() { + image.addEventListener('error', function() { console.debug('image load error, retry in 1s', image); setTimeout(function() { console.debug('retrying image load', image); - var tmp = image.src; - image.src = ''; - image.src = tmp; + image.src = image.src; }, 1000); }); })(image); console.debug('image reload', image); - var tmp = image.src; - image.src = ''; - image.src = tmp; + image.src = image.src; } } },