Skip to content

Commit 18c161f

Browse files
author
Dmitry Kologrivov
committed
PV-7: Fix fotorama with media on storfront
1 parent 930a224 commit 18c161f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,17 @@ define([
134134
*/
135135
_createVideoData: function (inputData, isJSON) {
136136
var videoData = {},
137-
key,
138137
dataUrl,
139138
tmpVideoData,
140139
tmpInputData,
141-
inputDataKeys,
142140
i;
143141

144142
if (isJSON) {
145143
inputData = $.parseJSON(inputData);
146144
}
147145

148-
inputDataKeys = Object.keys(inputData);
149-
150-
for (i = 0; i < inputDataKeys.length; i++) {
151-
key = inputDataKeys[i];
152-
tmpInputData = inputData[key];
146+
for (i = 0; i < inputData.length; i++) {
147+
tmpInputData = inputData[i];
153148
dataUrl = '';
154149
tmpVideoData = {
155150
mediaType: '',
@@ -172,7 +167,7 @@ define([
172167
tmpVideoData.provider = dataUrl.type;
173168
}
174169

175-
videoData[key] = tmpVideoData;
170+
videoData[i] = tmpVideoData;
176171
}
177172

178173
return videoData;

0 commit comments

Comments
 (0)