Skip to content

Commit f4c1f43

Browse files
authored
Prevent duplicate image loading (#25675)
Regression of #25672.
1 parent 43c9a84 commit f4c1f43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: 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)