Permalink
Browse files

fix bug checking the index when it should've checked the stack length

  • Loading branch information...
substack committed Aug 26, 2013
1 parent 1c7fe8b commit e4963993dce4b52fbdab886523250e14f870f1c3
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/matcher.js
View
@@ -122,7 +122,8 @@ Match.prototype.at = function (kind, node) {
this.unmatch();
}
}
- else if (this.index < this.startLevel && this.startLevel !== null) {
+ else if (this.stack.length < this.startLevel
+ && this.startLevel !== null) {
this.unmatch();
}
}

0 comments on commit e496399

Please sign in to comment.