fix: add error handling in processScriptFull for display mode
This commit is contained in:
@@ -109,6 +109,7 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter
|
|||||||
if(mode === 'editdisplay'){
|
if(mode === 'editdisplay'){
|
||||||
const currentChar = getCurrentCharacter()
|
const currentChar = getCurrentCharacter()
|
||||||
if(currentChar.type !== 'group'){
|
if(currentChar.type !== 'group'){
|
||||||
|
try{
|
||||||
const perf = performance.now()
|
const perf = performance.now()
|
||||||
const d = await runTrigger(currentChar, 'display', {
|
const d = await runTrigger(currentChar, 'display', {
|
||||||
chat: getCurrentChat(),
|
chat: getCurrentChat(),
|
||||||
@@ -119,6 +120,10 @@ export async function processScriptFull(char:character|groupChat|simpleCharacter
|
|||||||
data = d.displayData ?? data
|
data = d.displayData ?? data
|
||||||
console.log('Trigger time', performance.now() - perf)
|
console.log('Trigger time', performance.now() - perf)
|
||||||
}
|
}
|
||||||
|
catch(e){
|
||||||
|
console.error(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pluginV2[mode].size > 0){
|
if(pluginV2[mode].size > 0){
|
||||||
|
|||||||
Reference in New Issue
Block a user