File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
app/code/Magento/Swatches/view/base/web/js Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -460,13 +460,14 @@ define([
460
460
'</div>'
461
461
) ;
462
462
463
- if ( $widget . options . jsonConfig . canDisplayShowOutOfStockStatus )
464
- {
465
- var salableProd = $widget . options . jsonConfig . salable [ item . id ] ,
463
+ if ( $widget . options . jsonConfig . canDisplayShowOutOfStockStatus ) {
464
+ let salableProd = $widget . options . jsonConfig . salable [ item . id ] ,
466
465
swatchOptions = container . find ( '.swatch-option' ) ;
467
- swatchOptions . each ( function ( key , value ) {
468
- var optionId = $ ( value ) . data ( 'option-id' ) ;
469
- if ( ! salableProd . hasOwnProperty ( optionId ) ) {
466
+
467
+ swatchOptions . each ( function ( key , value ) {
468
+ let optionId = $ ( value ) . data ( 'option-id' ) ;
469
+
470
+ if ( ! salableProd . hasOwnProperty ( optionId ) ) {
470
471
$ ( value ) . attr ( 'disabled' , true ) . addClass ( 'disabled' ) ;
471
472
}
472
473
} ) ;
@@ -502,9 +503,6 @@ define([
502
503
// Handle events like click or change
503
504
$widget . _EventListener ( ) ;
504
505
505
- // Rewind options
506
- // $widget._Rewind(container);
507
-
508
506
//Emulate click on all swatches from Request
509
507
$widget . _EmulateSelected ( $ . parseQuery ( ) ) ;
510
508
$widget . _EmulateSelected ( $widget . _getSelectedAttributes ( ) ) ;
You can’t perform that action at this time.
0 commit comments