Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Improve code readability
dominik-zeglen42f91d66f874
diff --git a/saleor/static/dashboard-next/misc.ts b/saleor/static/dashboard-next/misc.tsindex b97e7e8f2d..2d5373bc1c 100644--- a/saleor/static/dashboard-next/misc.ts+++ b/saleor/static/dashboard-next/misc.ts@@ -144,11 +144,11 @@ export function getMutationState(loading: boolean,errorList: UserError[]): ConfirmButtonTransitionState {- return loading- ? "loading"- : called- ? hasErrors(errorList)- ? "error"- : "success"- : "default";+ if (loading) {+ return "loading";+ }+ if (called) {+ return hasErrors(errorList) ? "error" : "success";+ }+ return "default";}