Skip to content

Commit

Permalink
Fix loading shipping info (#4526)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejewsky authored Dec 12, 2023
1 parent f0e4f59 commit c7f36a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/orange-ways-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Fix loading shipping information
5 changes: 4 additions & 1 deletion src/shipping/views/RateUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ export const RateUpdate: React.FC<RateUpdateProps> = ({
const [state, dispatch] = React.useReducer(postalCodesReducer, {
codesToDelete: [],
havePostalCodesChanged: false,
inclusionType: rate?.postalCodeRules![0].inclusionType!,
inclusionType:
(rate?.postalCodeRules?.length &&
rate?.postalCodeRules[0].inclusionType) ||
undefined,
originalCodes: [],
postalCodeRules: rate?.postalCodeRules || [],
});
Expand Down

0 comments on commit c7f36a6

Please sign in to comment.