Skip to content

Commit 9f62fc9

Browse files
committed
ACP2E-1648: fix magnifier loading
1 parent 405bee6 commit 9f62fc9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/web/magnifier/magnifier.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,11 +541,9 @@
541541

542542
showWrapper = false;
543543
$(thumbObj).on('load', function () {
544-
if (data.length > 0) {
544+
if (data.hasOwnProperty(idx)) {
545545
data[idx].status = 1;
546-
547546
$(largeObj).on('load', function () {
548-
549547
if (largeObj.width > largeWrapper.width() || largeObj.height > largeWrapper.height()) {
550548
showWrapper = true;
551549
bindEvents(eventType, thumb);
@@ -559,7 +557,6 @@
559557
updateLensOnLoad(idx, thumb, largeObj, largeWrapper);
560558
}
561559
});
562-
563560
largeObj.src = data[idx].largeUrl;
564561
}
565562
});

0 commit comments

Comments
 (0)