fix: skip empty image load
This commit is contained in:
parent
8299973c7b
commit
83e50210ed
|
@ -52,6 +52,9 @@ class AnimatedBase extends Trait {
|
||||||
if (!('container' in this.entity)) {
|
if (!('container' in this.entity)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!this.image) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Image.load(this.image).then((image) => {
|
Image.load(this.image).then((image) => {
|
||||||
this.sprite = new Sprite(image);
|
this.sprite = new Sprite(image);
|
||||||
this.entity.container.addChild(this.sprite);
|
this.entity.container.addChild(this.sprite);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user