fix: add missing breaks

This commit is contained in:
Sunho Kim
2024-07-15 21:12:14 -07:00
parent cb9514c508
commit 5b4a4f0e30

View File

@@ -420,18 +420,21 @@ export async function runLua(code:string, arg:{
if(func){
res = await func(accessKey)
}
break
}
case 'output':{
const func = luaEngine.global.get('onOutput')
if(func){
res = await func(accessKey)
}
break
}
case 'start':{
const func = luaEngine.global.get('onStart')
if(func){
res = await func(accessKey)
}
break
}
case 'editRequest':
case 'editDisplay':
@@ -442,12 +445,14 @@ export async function runLua(code:string, arg:{
res = await func(mode, accessKey, JSON.stringify(data))
res = JSON.parse(res)
}
break
}
default:{
const func = luaEngine.global.get(mode)
if(func){
res = await func(accessKey)
}
break
}
}
if(res === false){