File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/variations/steps Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,7 @@ define([
37
37
error : null
38
38
} ,
39
39
options : {
40
- isResizeEnabled : false ,
41
- maxWidth : 1920 ,
42
- maxHeight : 1080
40
+ isResizeEnabled : ''
43
41
}
44
42
} ,
45
43
@@ -79,9 +77,9 @@ define([
79
77
80
78
// Retrieve configuration passed from .phtml
81
79
if ( config ) {
82
- this . options . isResizeEnabled = config . isResizeEnabled || false ;
83
- this . options . maxWidth = config . maxWidth || 1920 ;
84
- this . options . maxHeight = config . maxHeight || 1080 ;
80
+ this . options . isResizeEnabled = config . isResizeEnabled ;
81
+ this . options . maxWidth = config . maxWidth ;
82
+ this . options . maxHeight = config . maxHeight ;
85
83
}
86
84
87
85
this . variationsComponent ( function ( variationsComponent ) {
@@ -462,9 +460,10 @@ define([
462
460
463
461
// initialize Uppy upload
464
462
uppy . use ( Uppy . Dashboard , options ) ;
465
-
466
463
// Use 'self.options' to access component options
467
- if ( self . options ?. isResizeEnabled ) {
464
+ self . options = self . options || { } ;
465
+
466
+ if ( self . options . isResizeEnabled ?? false ) {
468
467
uppy . use ( Uppy . Compressor , {
469
468
maxWidth : self . options . maxWidth ,
470
469
maxHeight : self . options . maxHeight ,
You can’t perform that action at this time.
0 commit comments