From 88a02716f5e37ccdf7d67c54b26c5cd150a76429 Mon Sep 17 00:00:00 2001 From: Daishan Peng Date: Wed, 28 Aug 2024 22:51:58 -0700 Subject: [PATCH] Fix: fix mysterious digest error bug Signed-off-by: Daishan Peng --- contexts/edit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contexts/edit.tsx b/contexts/edit.tsx index f05356ca..11862503 100644 --- a/contexts/edit.tsx +++ b/contexts/edit.tsx @@ -349,7 +349,7 @@ const EditContextProvider: React.FC = ({ const update = useCallback(async () => { if (debounceTimer.current) clearTimeout(debounceTimer.current); debounceTimer.current = setTimeout(async () => { - if (scriptId && visibility && root) { + if (scriptId && visibility && root && root.name) { const existing = await getScript(scriptId.toString()); const scriptTools = [root, ...tools]; if (knowledgeTool.name) {