Skip to content

Commit

Permalink
fix endIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke committed Mar 20, 2024
1 parent 1bea246 commit b45e7e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/node.js
Expand Up @@ -241,7 +241,7 @@ class Node {
column: opts.end.column,
line: opts.end.line
}
} else if (opts.endIndex) {
} else if (typeof opts.endIndex === 'number') {
end = this.positionInside(opts.endIndex)
} else if (opts.index) {
end = this.positionInside(opts.index + 1)
Expand Down

0 comments on commit b45e7e9

Please sign in to comment.