prevent selectChatIndex -1 error
This commit is contained in:
@@ -8,6 +8,8 @@ export default function ChatBOX(props: {
|
||||
setChatStore: (cs: ChatStore) => void;
|
||||
}) {
|
||||
const { chatStore, setChatStore } = props;
|
||||
// prevent error
|
||||
if (chatStore === undefined) return <div></div>;
|
||||
const [inputMsg, setInputMsg] = useState("");
|
||||
const [showGenerating, setShowGenerating] = useState(false);
|
||||
const [generatingMessage, setGeneratingMessage] = useState("");
|
||||
|
||||
Reference in New Issue
Block a user