fix structuredclone
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
"system": "⚙️ System",
|
||||
"assistant": "✨ Assistant",
|
||||
}
|
||||
let formated = structuredClone(previewFormated)
|
||||
let formated = safeStructuredClone(previewFormated)
|
||||
|
||||
if(previewJoin === 'yes'){
|
||||
let newFormated = []
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
const option = await alertChatOptions()
|
||||
switch(option){
|
||||
case 0:{
|
||||
const newChat = structuredClone($state.snapshot(chara.chats[i]))
|
||||
const newChat = safeStructuredClone($state.snapshot(chara.chats[i]))
|
||||
newChat.name = `Copy of ${newChat.name}`
|
||||
chara.chats.unshift(newChat)
|
||||
chara.chatPage = 0
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
const da = db.characterOrder[mainIndex.index]
|
||||
if(typeof(da) !== 'string'){
|
||||
mainId = da.id
|
||||
movingFolder = structuredClone($state.snapshot(da))
|
||||
movingFolder = safeStructuredClone($state.snapshot(da))
|
||||
if(targetIndex.folder){
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user