Skip to content

Commit

Permalink
fix: Update defaultParcelSize only when it exists
Browse files Browse the repository at this point in the history
Signed-off-by: Matias Zuniga <[email protected]>
  • Loading branch information
Manizuca committed Jul 16, 2020
1 parent 5095933 commit 85f301d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function ShopSettings() {
cleanedUserInput.currency = code;

// Only update default parcel size when UOL/UOM are changed by the user
if (userInput.baseUOL !== shop.baseUOL || userInput.baseUOM !== shop.baseUOM) {
if (shop.defaultParcelSize && (userInput.baseUOL !== shop.baseUOL || userInput.baseUOM !== shop.baseUOM)) {
const parcelSize = {
weight: convertWeight(shop.baseUOM, userInput.baseUOM, shop.defaultParcelSize.weight),
height: convertLength(shop.baseUOL, userInput.baseUOL, shop.defaultParcelSize.height),
Expand Down

0 comments on commit 85f301d

Please sign in to comment.