fix: skip empty
This commit is contained in:
parent
51a3576bca
commit
b56d95f4fa
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user