Type fixes

This commit is contained in:
eduardruzga
2024-11-23 10:41:43 +02:00
parent 6e8aa04d27
commit fbea474442
4 changed files with 13 additions and 4 deletions

View File

@@ -131,7 +131,11 @@ export function useChatHistory() {
window.location.href = `/chat/${newId}`;
toast.success('Chat imported successfully');
} catch (error) {
toast.error('Failed to import chat: ' + error.message);
if (error instanceof Error) {
toast.error('Failed to import chat: ' + error.message);
} else {
toast.error('Failed to import chat');
}
}
},
exportChat: async (id = urlId) => {