From 929c22a4e8c4a6a270df16a7ea14a0d7f57f5a5b Mon Sep 17 00:00:00 2001 From: Carson <331094718@qq.com> Date: Thu, 18 Jul 2024 19:02:23 +0800 Subject: [PATCH] fix: tools edit modal schema edit issue (#6396) --- .../components/tools/edit-custom-collection-modal/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 = '' })