Browse Source

fix: bug #1662

ShengYan, Zhang 1 năm trước cách đây
mục cha
commit
23f6c2e8c9
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/components/chat.tsx

+ 1 - 1
app/components/chat.tsx

@@ -271,7 +271,7 @@ export function PromptHints(props: {
 
     return () => window.removeEventListener("keydown", onKeyDown);
     // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, [noPrompts, selectIndex]);
+  }, [props.prompts.length, selectIndex]);
 
   if (noPrompts) return null;
   return (