优化写法2

This commit is contained in:
shijian 2023-12-18 09:49:56 +08:00
parent d84208747a
commit 327744cc0e
1 changed files with 2 additions and 1 deletions

View File

@ -41530,6 +41530,7 @@ new Promise(resolve=>{
} }
} }
else { else {
game.executingAsyncEventMap.delete(event.toEvent());
if (event.parent) { if (event.parent) {
if (event.result) { if (event.result) {
event.parent._result = event.result; event.parent._result = event.result;
@ -41607,7 +41608,7 @@ new Promise(resolve=>{
else throw e; else throw e;
}).then(after).then(()=>{ }).then(after).then(()=>{
if (event.finished) { if (event.finished) {
if (game.executingAsyncEventMap) game.executingAsyncEventMap.clear(); game.executingAsyncEventMap.delete(event.toEvent());
} }
}); });
} }