diff --git a/src/Interface.js b/src/Interface.js index 4674646..e4e048c 100644 --- a/src/Interface.js +++ b/src/Interface.js @@ -71,8 +71,7 @@ PrinceJS.Interface.prototype = { }, setOpponentLive: function(actor) { - - if (actor.charName == 'skeleton') return; + if (!actor || actor.charName == 'skeleton') return; this.oppHPActive = actor.health; for (var i=actor.health; i > 0; i--) {