fix: skip empty image load

This commit is contained in:
cha0s 2019-03-19 10:46:20 -05:00
parent 8299973c7b
commit 83e50210ed

View File

@ -52,6 +52,9 @@ class AnimatedBase extends Trait {
if (!('container' in this.entity)) {
return;
}
if (!this.image) {
return;
}
Image.load(this.image).then((image) => {
this.sprite = new Sprite(image);
this.entity.container.addChild(this.sprite);