-
-
Save csavoronin/d554797a10593124a8a202f49c072e44 to your computer and use it in GitHub Desktop.
[!] {@32890}: Checkout: Profile fields: The shipping zipcode was filled with the zip code from the billing address. Fixed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/js/tygh/checkout/lite_checkout.js b/js/tygh/checkout/lite_checkout.js | |
index 6a404826a85..c10357aa372 100644 | |
--- a/js/tygh/checkout/lite_checkout.js | |
+++ b/js/tygh/checkout/lite_checkout.js | |
@@ -355,8 +355,8 @@ | |
setLocation: function(city, stateCode, state, zipcode) { | |
// update plain fields | |
$city.val(city); | |
- if ($zipCode.length) { | |
- $zipCode.val(zipcode ? zipcode : ''); | |
+ if ($zipCode.length && typeof zipcode !== 'undefined' && typeof zipcode === 'string') { | |
+ $zipCode.val(zipcode); | |
} | |
methods.getElement('state').val(stateCode ? stateCode : state); | |
@@ -618,8 +618,6 @@ | |
if (isCityChanged || isStateChanged || isCountryChanged) { | |
methods.setLocation(city, stateCode, state); | |
- } else if ($zipCode.length && ($zipCode.val() !== $zipCode.data('caLiteCheckoutLastValue'))) { | |
- methods.setLocation(city, stateCode, state, $zipCode.val()); | |
} | |
}, | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment