From ef886f9cae30ab2fddfc2a3e1fc33533ab6024b0 Mon Sep 17 00:00:00 2001 From: kuangthree Date: Sat, 17 Feb 2024 18:19:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=9F=E6=88=90=E5=99=A8?= =?UTF-8?q?=E5=BD=A2=E5=BC=8Fcontent=E7=9A=84=E4=B8=80=E4=B8=AA=E6=97=A0?= =?UTF-8?q?=E9=99=90=E5=BE=AA=E7=8E=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/library/init/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/noname/library/init/index.js b/noname/library/init/index.js index 28ffeb500..f63b8b9d0 100644 --- a/noname/library/init/index.js +++ b/noname/library/init/index.js @@ -712,7 +712,10 @@ export class LibInit extends Uninstantable { result: result }); var res = gen.next((lastEvent && (typeof lastEvent == 'object') && ("result" in lastEvent)) ? lastEvent.result : lastEvent); - if (res.done) return event.finish(); + if (res.done){ + gen = null; + return event.finish(); + } var currentResult = res.value; // TODO: use `event.debugger` to replace source if (typeof currentResult == "function") yield currentResult;