Skip to content

Commit f344e28

Browse files
committed
Use switch statement to increase readability
1 parent 4f8417e commit f344e28

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

WooCommerce/Classes/ViewRelated/Orders/Order Details/Shipping Labels/WooShipping Create Shipping Labels/WooShippingAddresses/WooShippingEditAddressViewModel.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,10 @@ extension WooShippingEditAddressViewModel {
439439
selectedState: String?,
440440
originCountryCode: String?,
441441
originStateCode: String?) -> Bool {
442-
if addressType == .origin {
442+
switch addressType {
443+
case .origin:
443444
return true
444-
} else {
445+
case .destination:
445446
return WooShippingCustomsRequirements.isCustomsRequired(originCountry: originCountryCode,
446447
originState: originStateCode,
447448
destinationCountry: selectedCountryCode,

0 commit comments

Comments
 (0)