fix: skip empty
This commit is contained in:
parent
51a3576bca
commit
b56d95f4fa
|
@ -356,7 +356,9 @@ export default class Ecs {
|
||||||
toJSON() {
|
toJSON() {
|
||||||
const entities = {};
|
const entities = {};
|
||||||
for (const id in this.$$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 = [];
|
const systems = [];
|
||||||
for (const systemName in this.Systems) {
|
for (const systemName in this.Systems) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user