From 5b4a4f0e304327dd14730ad0e5e2d35c85ad4076 Mon Sep 17 00:00:00 2001 From: Sunho Kim Date: Mon, 15 Jul 2024 21:12:14 -0700 Subject: [PATCH] fix: add missing breaks --- src/ts/process/lua.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ts/process/lua.ts b/src/ts/process/lua.ts index e4477cc1..c327ab9e 100644 --- a/src/ts/process/lua.ts +++ b/src/ts/process/lua.ts @@ -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){