From 9ea7b269ccd99fc57e1fa79efad4a85d1e1ea169 Mon Sep 17 00:00:00 2001 From: Higor Santiago <93281590+HigorSantiago@users.noreply.github.com> Date: Thu, 23 Nov 2023 08:04:52 -0300 Subject: [PATCH] 4445 refactor code smell many mon null assertions (#4446) * 4431-refactor-code-smell-enum-implicit-value-code-smell * 4433-refactor-code-smell-missing-union-type * 4440-refactor-code-any-type-in-form-events-and-inputs * 4445-refactor-code-smell-many-mon-null-assertions * remove-reactsniffer-and-understand-files * Create lucky-monkeys-care.md --------- Co-authored-by: Patryk Andrzejewski --- .changeset/lucky-monkeys-care.md | 5 +++++ src/shipping/views/RateUpdate.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/lucky-monkeys-care.md diff --git a/.changeset/lucky-monkeys-care.md b/.changeset/lucky-monkeys-care.md new file mode 100644 index 00000000000..63aa0be36aa --- /dev/null +++ b/.changeset/lucky-monkeys-care.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Refactor code smell many mon null assertions diff --git a/src/shipping/views/RateUpdate.tsx b/src/shipping/views/RateUpdate.tsx index e1b4dbdb8b6..f669b95effb 100644 --- a/src/shipping/views/RateUpdate.tsx +++ b/src/shipping/views/RateUpdate.tsx @@ -217,7 +217,7 @@ export const RateUpdate: React.FC = ({ formData: ShippingZoneRateUpdateFormData, ): Promise => { const getUpdateVariables = - rate!.type === ShippingMethodTypeEnum.PRICE + rate.type === ShippingMethodTypeEnum.PRICE ? getUpdateShippingPriceRateVariables : getUpdateShippingWeightRateVariables; const response = await updateShippingRate({