mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 15:53:59 +01:00
update migration
This commit is contained in:
parent
dd9290241f
commit
9fa830d57d
|
@ -1,5 +1,9 @@
|
|||
import { LocalStorageInterface } from '@type/chat';
|
||||
import { defaultChatConfig } from '@constants/chat';
|
||||
|
||||
export const migrateV0 = (persistedState: LocalStorageInterface) => {
|
||||
persistedState.chats.forEach((chat) => (chat.titleSet = false));
|
||||
persistedState.chats.forEach((chat) => {
|
||||
chat.titleSet = false;
|
||||
if (!chat.config) chat.config = { ...defaultChatConfig };
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue