diff --git a/src/features/settings/index.tsx b/src/features/settings/index.tsx index d3c7c26..96dea55 100644 --- a/src/features/settings/index.tsx +++ b/src/features/settings/index.tsx @@ -35,14 +35,16 @@ function handleSubmit(e: React.FormEvent) { e.preventDefault(); const merchant = getMerchant(); - if (!merchant || !form) return; - if (!isFormValid) return; - const isDifferent = isObjectValueDifferent(merchant, form); + if(merchant){ + const isDifferent = isObjectValueDifferent(merchant, form); + if (isDifferent) { + clearDevice(); // reset device kalau merchant berubah + } - if (isDifferent) { - clearDevice(); // reset device kalau merchant berubah } + + setLoading(true); saveMerchant(form);