fix(AdminApplicationSettings): handle undefined appConfig object

This commit is contained in:
Rıdvan Akca
2024-05-31 13:25:15 +02:00
parent b3c3998189
commit ba52e298eb

View File

@@ -36,7 +36,7 @@ function AdminApplicationSettings(props) {
const handleSubmit = async (values) => { const handleSubmit = async (values) => {
try { try {
if (!appConfig.data) { if (!appConfig?.data) {
await createAppConfig({ await createAppConfig({
variables: { variables: {
input: { key: props.appKey, ...values }, input: { key: props.appKey, ...values },
@@ -69,6 +69,7 @@ function AdminApplicationSettings(props) {
}), }),
[appConfig?.data], [appConfig?.data],
); );
return ( return (
<Form <Form
defaultValues={defaultValues} defaultValues={defaultValues}