fix: tools edit modal schema edit issue (#6396)

pull/6432/head
Carson 2 years ago committed by GitHub
parent ba181197c2
commit 929c22a4e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -87,9 +87,9 @@ const EditCustomCollectionModal: FC<Props> = ({
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<Props> = ({
setParamsSchemas(parameters_schema)
}
catch (e) {
const customCollection = getCustomCollection()
const newCollection = produce(customCollection, (draft) => {
draft.schema_type = ''
})

Loading…
Cancel
Save