File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/columns/image Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ define([
22
22
* @returns {Boolean }
23
23
*/
24
24
insertImage : function ( record , config ) {
25
- var targetElement ;
25
+ var targetElement , forceStaticPath ;
26
26
27
27
if ( record === null ) {
28
28
return false ;
@@ -34,14 +34,15 @@ define([
34
34
throw $t ( 'Target element not found for content update' ) ;
35
35
}
36
36
37
+ forceStaticPath = typeof targetElement !== 'function' && targetElement . data ( 'force_static_path' ) ? 1 : 0
38
+
37
39
$ . ajax ( {
38
40
url : config . onInsertUrl ,
39
41
data : {
40
42
filename : record [ 'encoded_id' ] ,
41
43
'store_id' : config . storeId ,
42
44
'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 ,
45
46
'form_key' : FORM_KEY
46
47
} ,
47
48
context : this ,
You can’t perform that action at this time.
0 commit comments