修改yield 非事件报错

This commit is contained in:
Curpond 2024-01-08 10:50:06 +08:00
parent 96e11774ce
commit 40a8bb05fa
1 changed files with 1 additions and 1 deletions

View File

@ -682,7 +682,7 @@ export class LibInit extends Uninstantable {
trigger: trigger, trigger: trigger,
result: result result: result
}); });
var res = gen.next((lastEvent && ("result" in lastEvent)) ? lastEvent.result : null); var res = gen.next((lastEvent && (typeof lastEvent == 'object') && ("result" in lastEvent)) ? lastEvent.result : lastEvent);
if (res.done) return event.finish(); if (res.done) return event.finish();
var currentResult = res.value; var currentResult = res.value;
// TODO: use `event.debugger` to replace source // TODO: use `event.debugger` to replace source