diff --git a/components/Script.tsx b/components/Script.tsx index 208b7bd..2ad4aab 100644 --- a/components/Script.tsx +++ b/components/Script.tsx @@ -25,6 +25,8 @@ function ScriptItem() { useEffect(() => { if (id) { getItem(); + } else { + setItem(null); } }, [id]);