Skip to content

Commit d373b0c

Browse files
AC-246: Update MFTF Tests
- fix static failures
1 parent 8a62a0c commit d373b0c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image/insertImageAction.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ define([
2222
* @returns {Boolean}
2323
*/
2424
insertImage: function (record, config) {
25-
var targetElement;
25+
var targetElement, forceStaticPath;
2626

2727
if (record === null) {
2828
return false;
@@ -34,14 +34,15 @@ define([
3434
throw $t('Target element not found for content update');
3535
}
3636

37+
forceStaticPath = typeof targetElement !== 'function' && targetElement.data('force_static_path') ? 1 : 0
38+
3739
$.ajax({
3840
url: config.onInsertUrl,
3941
data: {
4042
filename: record['encoded_id'],
4143
'store_id': config.storeId,
4244
'as_is': typeof targetElement !== 'function' && targetElement.is('textarea') ? 1 : 0,
43-
'force_static_path': typeof targetElement !== 'function' && targetElement.data('force_static_path')
44-
? 1 : 0,
45+
'force_static_path': forceStaticPath,
4546
'form_key': FORM_KEY
4647
},
4748
context: this,

0 commit comments

Comments
 (0)