mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 05:09:09 +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, false)
|
||||||
}, [setPending, blockId, completion, prompt, onSave, t])
|
}, [setPending, blockId, completion, prompt, t, onSave, setError])
|
||||||
|
|
||||||
// when unmounted
|
// when unmounted
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user