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 @@ -907,7 +907,8 @@ define([
907907 $productPrice = $product . find ( this . options . selectorProductPrice ) ,
908908 options = _ . object ( _ . keys ( $widget . optionsMap ) , { } ) ,
909909 result ,
910- tierPriceHtml ;
910+ tierPriceHtml ,
911+ isShow ;
911912
912913 $widget . element . find ( '.' + $widget . options . classes . attributeClass + '[option-selected]' ) . each ( function ( ) {
913914 var attributeId = $ ( this ) . attr ( 'attribute-id' ) ;
@@ -924,11 +925,9 @@ define([
924925 }
925926 ) ;
926927
927- if ( typeof result != 'undefined' && result . oldPrice . amount !== result . finalPrice . amount ) {
928- $ ( this . options . slyOldPriceSelector ) . show ( ) ;
929- } else {
930- $ ( this . options . slyOldPriceSelector ) . hide ( ) ;
931- }
928+ isShow = typeof result != 'undefined' && result . oldPrice . amount !== result . finalPrice . amount ;
929+
930+ $product . find ( this . options . slyOldPriceSelector ) [ isShow ? 'show' : 'hide' ] ( ) ;
932931
933932 if ( typeof result != 'undefined' && result . tierPrices . length ) {
934933 if ( this . options . tierPriceTemplate ) {
You can’t perform that action at this time.
0 commit comments