Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Simplify logic

dominik-zeglena307c250ee57
diff --git a/saleor/static/dashboard-next/siteSettings/views/index.tsx b/saleor/static/dashboard-next/siteSettings/views/index.tsx
index fab4991579..c527ff6ffe 100644
--- a/saleor/static/dashboard-next/siteSettings/views/index.tsx
+++ b/saleor/static/dashboard-next/siteSettings/views/index.tsx
@@ -61,8 +61,10 @@ export const SiteSettings: React.StatelessComponent<{}> = () => (
};
const handleSiteSettingsSuccess = (data: ShopSettingsUpdate) => {
if (
- !maybe(() => data.shopDomainUpdate.errors.length) &&
- !maybe(() => data.shopSettingsUpdate.errors.length)
+ (!data.shopDomainUpdate.errors ||
+ data.shopDomainUpdate.errors.length === 0) &&
+ (!data.shopSettingsUpdate.errors ||
+ data.shopSettingsUpdate.errors.length === 0)
) {
pushMessage({
text: i18n.t("Site settings updated", {