Skip to content

Commit de944ad

Browse files
author
Mateusz Krzeszowiak
committed
Fix tests
1 parent c10d0a1 commit de944ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/web/mage/gallery/gallery.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,18 +310,20 @@ define([
310310
$fotoramaElement = $element.find('[data-gallery-role="gallery"]');
311311
$fotoramaElement.fotorama(config);
312312
$fotoramaElement.find('.fotorama__stage__frame.fotorama__active')
313-
.one('f:load', function() {
313+
.one('f:load', function () {
314314
// Remove placeholder when main gallery image loads.
315315
$placeholderImage.remove();
316316
$element
317317
.removeClass('_block-content-loading')
318318
.css('min-height', '');
319319
});
320+
settings.$elementF = $fotoramaElement;
320321
settings.fotoramaApi = $fotoramaElement.data('fotorama');
321322

322323
$.extend(true, config, this.startConfig);
323324

324325
mainImageIndex = getMainImageIndex(config.data);
326+
325327
if (mainImageIndex) {
326328
this.settings.fotoramaApi.show({
327329
index: mainImageIndex,

0 commit comments

Comments
 (0)