mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-07-29 11:18:25 +08:00
fix: crypto undefined on some websites, leading to session creation failure (#231)
This commit is contained in:
@@ -15,6 +15,7 @@ import { useTranslation } from 'react-i18next'
|
||||
import DeleteButton from '../DeleteButton'
|
||||
import { useConfig } from '../../hooks/use-config.mjs'
|
||||
import { createSession } from '../../config/localSession.mjs'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
const logo = Browser.runtime.getURL('logo.png')
|
||||
|
||||
@@ -306,7 +307,7 @@ function ConversationCard(props) {
|
||||
...session,
|
||||
sessionName: new Date().toLocaleString(),
|
||||
autoClean: false,
|
||||
sessionId: crypto.randomUUID(),
|
||||
sessionId: uuidv4(),
|
||||
}
|
||||
setSession(newSession)
|
||||
createSession(newSession).then(() =>
|
||||
|
||||
Reference in New Issue
Block a user