File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
app/code/Magento/Swatches/view/frontend/web/js Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -902,7 +902,8 @@ define([
902902 $productPrice = $product . find ( this . options . selectorProductPrice ) ,
903903 options = _ . object ( _ . keys ( $widget . optionsMap ) , { } ) ,
904904 result ,
905- tierPriceHtml ;
905+ tierPriceHtml ,
906+ isShow ;
906907
907908 $widget . element . find ( '.' + $widget . options . classes . attributeClass + '[option-selected]' ) . each ( function ( ) {
908909 var attributeId = $ ( this ) . attr ( 'attribute-id' ) ;
@@ -919,11 +920,9 @@ define([
919920 }
920921 ) ;
921922
922- if ( typeof result != 'undefined' && result . oldPrice . amount !== result . finalPrice . amount ) {
923- $ ( this . options . slyOldPriceSelector ) . show ( ) ;
924- } else {
925- $ ( this . options . slyOldPriceSelector ) . hide ( ) ;
926- }
923+ isShow = typeof result != 'undefined' && result . oldPrice . amount !== result . finalPrice . amount ;
924+
925+ $product . find ( this . options . slyOldPriceSelector ) [ isShow ? 'show' : 'hide' ] ( ) ;
927926
928927 if ( typeof result != 'undefined' && result . tierPrices . length ) {
929928 if ( this . options . tierPriceTemplate ) {
You can’t perform that action at this time.
0 commit comments