Skip to content

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

Prevent object invocations

dominik-zeglen36383f47ecfc
diff --git a/saleor/static/dashboard-next/components/Form/Form.tsx b/saleor/static/dashboard-next/components/Form/Form.tsx
index 1c773751b2..2878b6195b 100644
--- a/saleor/static/dashboard-next/components/Form/Form.tsx
+++ b/saleor/static/dashboard-next/components/Form/Form.tsx
@@ -101,7 +101,7 @@ class FormComponent<T extends {} = {}> extends React.Component<
[target.name]: target.value
}
},
- cb
+ typeof cb === "function" ? cb : undefined
);
};