mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-27 12:51:26 +08:00
fix(useMermaidFixTool): add missing dependency to useEffect hook
Add setError to the dependency array to prevent stale closure issues
This commit is contained in:
parent
8ba48d9df0
commit
55b63d345e
@ -150,7 +150,7 @@ export const useMermaidFixTool = ({ enabled, context, onSave, setError, setTools
|
||||
}
|
||||
|
||||
setPending(blockId, false)
|
||||
}, [setPending, blockId, completion, prompt, onSave, t])
|
||||
}, [setPending, blockId, completion, prompt, t, onSave, setError])
|
||||
|
||||
// when unmounted
|
||||
useEffect(() => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user