From 3b0edf0d2766c0a71e26e7565937a36593d1d038 Mon Sep 17 00:00:00 2001 From: Rintim Date: Sun, 10 Sep 2023 16:48:02 +0800 Subject: [PATCH] add default value. --- game/game.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/game/game.js b/game/game.js index c675dcf0d..8244ecbaa 100644 --- a/game/game.js +++ b/game/game.js @@ -44,6 +44,8 @@ let nexts=resolve; let throws=reject; if(gnc.is.coroutine(gen)||(gnc.is.generator(gen)&&!gnc.nocoroutine)) { + if(!gen.status)gen.status="next"; + if(!gen.state)gen.state=undefined; try{ result=gen[result.status](result.state); }catch(error){