Merge pull request #773 from Curpond/master

修复技能中yield 一个非事件保错的问题
This commit is contained in:
Spmario233 2024-01-08 23:51:28 +08:00 committed by GitHub
commit 04fd2859a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -682,7 +682,7 @@ export class LibInit extends Uninstantable {
trigger: trigger,
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();
var currentResult = res.value;
// TODO: use `event.debugger` to replace source