Skip to content

Commit 2811402

Browse files
committed
ACP2E-2266: change mixin to be compatible with Fastly_Cdn module
1 parent 6b96581 commit 2811402

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

app/code/Magento/Catalog/view/frontend/web/js/gallery-mixin.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818
*/
1919

2020
define([
21-
'jquery',
22-
'mage/utils/wrapper'
23-
], function ($, wrapper) {
21+
'jquery'
22+
], function ($) {
2423
'use strict';
2524

26-
return function (initialize) {
27-
// eslint-disable-next-line no-shadow
28-
return wrapper.wrap(initialize, function (initialize, config, element) {
29-
initialize(config, element);
30-
$(element).one('f:load', function (event) {
31-
if ($(event.target).hasClass('fotorama__active')) {
32-
$(event.target).find('img').attr('itemprop', 'image');
33-
}
34-
});
25+
return function (gallery) {
26+
return gallery.extend({
27+
initialize: function (config, element) {
28+
this._super(config, element);
29+
$(element).one('f:load', function (event) {
30+
if ($(event.target).hasClass('fotorama__active')) {
31+
$(event.target).find('img').attr('itemprop', 'image');
32+
}
33+
});
34+
}
3535
});
3636
};
3737
});

0 commit comments

Comments
 (0)