Skip to content

Commit b45e7e9

Browse files
committed
fix endIndex
1 parent 1bea246 commit b45e7e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/node.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class Node {
241241
column: opts.end.column,
242242
line: opts.end.line
243243
}
244-
} else if (opts.endIndex) {
244+
} else if (typeof opts.endIndex === 'number') {
245245
end = this.positionInside(opts.endIndex)
246246
} else if (opts.index) {
247247
end = this.positionInside(opts.index + 1)

0 commit comments

Comments
 (0)