Skip to content

Commit eee74af

Browse files
committed
fix(client): bug on prompt that remains after validation of the form
1 parent c8e2a93 commit eee74af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/src/hooks/Input/useAutoSave.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import debounce from 'lodash/debounce';
22
import { SetterOrUpdater, useRecoilValue } from 'recoil';
3-
import { useState, useEffect, useMemo, useCallback } from 'react';
4-
import { LocalStorageKeys, TFile } from 'librechat-data-provider';
3+
import { useCallback, useEffect, useMemo, useState } from 'react';
4+
import { Constants, LocalStorageKeys, TFile } from 'librechat-data-provider';
55
import type { ExtendedFile } from '~/common';
66
import { useChatFormContext } from '~/Providers';
77
import { useGetFiles } from '~/data-provider';
@@ -164,7 +164,7 @@ export const useAutoSave = ({
164164
if (!saveDrafts || conversationId == null || conversationId === '') {
165165
return;
166166
}
167-
if (conversationId === currentConversationId) {
167+
if (conversationId === currentConversationId || conversationId === Constants.PENDING_CONVO) {
168168
return;
169169
}
170170

0 commit comments

Comments
 (0)