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([
3737 error : null
3838 } ,
3939 options : {
40- isResizeEnabled : false ,
41- maxWidth : 1920 ,
42- maxHeight : 1080
40+ isResizeEnabled : ''
4341 }
4442 } ,
4543
@@ -79,9 +77,9 @@ define([
7977
8078 // Retrieve configuration passed from .phtml
8179 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 ;
8583 }
8684
8785 this . variationsComponent ( function ( variationsComponent ) {
@@ -462,9 +460,10 @@ define([
462460
463461 // initialize Uppy upload
464462 uppy . use ( Uppy . Dashboard , options ) ;
465-
466463 // Use 'self.options' to access component options
467- if ( self . options ?. isResizeEnabled ) {
464+ self . options = self . options || { } ;
465+
466+ if ( self . options . isResizeEnabled ?? false ) {
468467 uppy . use ( Uppy . Compressor , {
469468 maxWidth : self . options . maxWidth ,
470469 maxHeight : self . options . maxHeight ,
You can’t perform that action at this time.
0 commit comments