Skip to content

Commit 4e31013

Browse files
GiteaBotdelvh
andauthoredJul 4, 2023
Prevent duplicate image loading (#25675) (#25684)
Backport #25675 by @delvh Regression of #25672. Co-authored-by: delvh <dev.lh@web.de>
1 parent 491f36d commit 4e31013

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎web_src/js/features/imagediff.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ export function initImageDiff() {
6565
};
6666
}
6767

68-
$('.image-diff').each(function() {
68+
$('.image-diff:not([data-image-diff-loaded])').each(function() {
6969
const $container = $(this);
70+
$container.attr('data-image-diff-loaded', 'true');
7071

7172
// the container may be hidden by "viewed" checkbox, so use the parent's width for reference
7273
const diffContainerWidth = Math.max($container.closest('.diff-file-box').width() - 300, 100);

0 commit comments

Comments
 (0)