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([
907
907
$productPrice = $product . find ( this . options . selectorProductPrice ) ,
908
908
options = _ . object ( _ . keys ( $widget . optionsMap ) , { } ) ,
909
909
result ,
910
- tierPriceHtml ;
910
+ tierPriceHtml ,
911
+ isShow ;
911
912
912
913
$widget . element . find ( '.' + $widget . options . classes . attributeClass + '[option-selected]' ) . each ( function ( ) {
913
914
var attributeId = $ ( this ) . attr ( 'attribute-id' ) ;
@@ -924,11 +925,9 @@ define([
924
925
}
925
926
) ;
926
927
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' ] ( ) ;
932
931
933
932
if ( typeof result != 'undefined' && result . tierPrices . length ) {
934
933
if ( this . options . tierPriceTemplate ) {
You can’t perform that action at this time.
0 commit comments