fix: avoid null removes

This commit is contained in:
cha0s 2021-02-09 16:31:19 -06:00
parent 3a5c4e5589
commit 525df7554c

View File

@ -294,6 +294,10 @@ export default () => class Visible extends decorate(Trait) {
if (!list) {
return;
}
const aabb = this.entity.visibleAabb;
if (Rectangle.isNull(aabb)) {
return;
}
list.quadTree.remove(this.entity);
this.#quadTreeAabb = [];
}