fix: didnt use preset from a exist convo

This commit is contained in:
Wentao Lyu 2023-04-07 01:49:28 +08:00
parent 96914387a6
commit 6e8a0a2f94
2 changed files with 4 additions and 3 deletions

View file

@ -49,7 +49,8 @@ export default function NewConversationMenu() {
// update the default model when availableModels changes
// typically, availableModels changes => modelsFilter or customGPTModels changes
useEffect(() => {
if (conversationId == 'new') {
const isInvalidConversation = !availableEndpoints.find(e => e === endpoint);
if (conversationId == 'new' && isInvalidConversation) {
newConversation();
}
}, [availableEndpoints]);