diff --git a/web/app/components/tools/edit-custom-collection-modal/index.tsx b/web/app/components/tools/edit-custom-collection-modal/index.tsx index c354bb919a..5fcf6fb024 100644 --- a/web/app/components/tools/edit-custom-collection-modal/index.tsx +++ b/web/app/components/tools/edit-custom-collection-modal/index.tsx @@ -87,9 +87,9 @@ const EditCustomCollectionModal: FC = ({ return } (async () => { - const customCollection = getCustomCollection() try { const { parameters_schema, schema_type } = await parseParamsSchema(debouncedSchema) + const customCollection = getCustomCollection() const newCollection = produce(customCollection, (draft) => { draft.schema_type = schema_type }) @@ -97,6 +97,7 @@ const EditCustomCollectionModal: FC = ({ setParamsSchemas(parameters_schema) } catch (e) { + const customCollection = getCustomCollection() const newCollection = produce(customCollection, (draft) => { draft.schema_type = '' })