fix: skip empty

This commit is contained in:
cha0s 2024-06-21 18:15:15 -05:00
parent 51a3576bca
commit b56d95f4fa

View File

@ -356,7 +356,9 @@ export default class Ecs {
toJSON() {
const entities = {};
for (const id in this.$$entities) {
entities[id] = this.$$entities[id].toJSON();
if (this.$$entities[id]) {
entities[id] = this.$$entities[id].toJSON();
}
}
const systems = [];
for (const systemName in this.Systems) {