Skip to content

Commit c886f31

Browse files
committed
cleanup
1 parent a83b7ce commit c886f31

File tree

1 file changed

+5
-3
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/custom-tool-modal

1 file changed

+5
-3
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/custom-tool-modal/custom-tool-modal.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ try {
271271
const { data: customTools = [] } = useCustomTools(workspaceId)
272272

273273
useEffect(() => {
274-
if (open && initialValues) {
274+
if (!open) return
275+
276+
if (initialValues) {
275277
try {
276278
setJsonSchema(
277279
typeof initialValues.schema === 'string'
@@ -285,10 +287,10 @@ try {
285287
logger.error('Error initializing form with initial values:', { error })
286288
setSchemaError('Failed to load tool data. Please try again.')
287289
}
288-
} else if (open) {
290+
} else {
289291
resetForm()
290292
}
291-
}, [open, initialValues])
293+
}, [open])
292294

293295
const resetForm = () => {
294296
setJsonSchema('')

0 commit comments

Comments
 (0)