From 83e50210edd945ffcd0cf708d1973fa22da0fe38 Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 19 Mar 2019 10:46:20 -0500 Subject: [PATCH] fix: skip empty image load --- packages/entity/traits/animated.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/entity/traits/animated.js b/packages/entity/traits/animated.js index 8b0fa3b..c5349e5 100644 --- a/packages/entity/traits/animated.js +++ b/packages/entity/traits/animated.js @@ -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);