Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Avoiding error when enemy moves and the image is not rendered yet. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso authored and young-steveo committed Nov 6, 2013
1 parent a9350e0 commit 249eabd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/js/game_board.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ var GameBoard = (function() {
};

Enemy.prototype.updatePosition = function(posNum) {
if (!this.spot) {
if (!this.spot || !this.image) {
this.mob.position = posNum;
this.render();
return;
Expand Down

0 comments on commit 249eabd

Please sign in to comment.