fix: des dep promise count check

This commit is contained in:
cha0s 2024-09-28 07:24:25 -05:00
parent 92c85e57d3
commit 46f0a0cc07

View File

@ -52,7 +52,7 @@ export default class Ecs {
promises.add(promise); promises.add(promise);
promise.then(() => { promise.then(() => {
promises.delete(promise); promises.delete(promise);
if (!this.$$destructionDependencies.get(id)?.resolvers) { if (0 === promises.size && !this.$$destructionDependencies.get(id)?.resolvers) {
this.$$destructionDependencies.delete(id); this.$$destructionDependencies.delete(id);
} }
}); });