Skip to content

Commit

Permalink
fix(cursor): Fix issue when reset() is undefined out of the bounding box
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaiklor committed Mar 21, 2016
1 parent 835507c commit 659435a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ export default class Cursor {
erase(x1, y1, x2, y2) {
for (var y = y1; y <= y2; y++) {
for (var x = x1; x <= x2; x++) {
this._cells[this.getPointerFromXY(x, y)].reset();
var pointer = this.getPointerFromXY(x, y);
this._cells[pointer] && this._cells[pointer].reset();
}
}

Expand Down

0 comments on commit 659435a

Please sign in to comment.