fix: add missing breaks
This commit is contained in:
@@ -420,18 +420,21 @@ export async function runLua(code:string, arg:{
|
|||||||
if(func){
|
if(func){
|
||||||
res = await func(accessKey)
|
res = await func(accessKey)
|
||||||
}
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
case 'output':{
|
case 'output':{
|
||||||
const func = luaEngine.global.get('onOutput')
|
const func = luaEngine.global.get('onOutput')
|
||||||
if(func){
|
if(func){
|
||||||
res = await func(accessKey)
|
res = await func(accessKey)
|
||||||
}
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
case 'start':{
|
case 'start':{
|
||||||
const func = luaEngine.global.get('onStart')
|
const func = luaEngine.global.get('onStart')
|
||||||
if(func){
|
if(func){
|
||||||
res = await func(accessKey)
|
res = await func(accessKey)
|
||||||
}
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
case 'editRequest':
|
case 'editRequest':
|
||||||
case 'editDisplay':
|
case 'editDisplay':
|
||||||
@@ -442,12 +445,14 @@ export async function runLua(code:string, arg:{
|
|||||||
res = await func(mode, accessKey, JSON.stringify(data))
|
res = await func(mode, accessKey, JSON.stringify(data))
|
||||||
res = JSON.parse(res)
|
res = JSON.parse(res)
|
||||||
}
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
default:{
|
default:{
|
||||||
const func = luaEngine.global.get(mode)
|
const func = luaEngine.global.get(mode)
|
||||||
if(func){
|
if(func){
|
||||||
res = await func(accessKey)
|
res = await func(accessKey)
|
||||||
}
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(res === false){
|
if(res === false){
|
||||||
|
|||||||
Reference in New Issue
Block a user