fix: container guards
This commit is contained in:
parent
0f244f13d8
commit
eaf031257e
|
@ -73,7 +73,9 @@ export class Visible extends decorate(Trait) {
|
|||
const zIndex = this.entity.zIndex;
|
||||
this._usingAutoZIndex = AUTO_ZINDEX === zIndex;
|
||||
if (!this._usingAutoZIndex) {
|
||||
this._container.zIndex = zIndex;
|
||||
if (this._container) {
|
||||
this._container.zIndex = zIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,7 +104,9 @@ export class Visible extends decorate(Trait) {
|
|||
}
|
||||
this._container.position = this.entity.position;
|
||||
if (this._usingAutoZIndex) {
|
||||
this._container.zIndex = this.entity.y;
|
||||
if (this._container) {
|
||||
this._container.zIndex = this.entity.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user