File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -850,7 +850,7 @@ module ts {
850
850
// Much of the time the parser will need the very next node in the array that
851
851
// we just returned a node from.So just simply check for that case and move
852
852
// forward in the array instead of searching for the node again.
853
- if ( current && current . end === position && currentArrayIndex < currentArray . length ) {
853
+ if ( current && current . end === position && currentArrayIndex < ( currentArray . length - 1 ) ) {
854
854
currentArrayIndex ++ ;
855
855
current = currentArray [ currentArrayIndex ] ;
856
856
}
@@ -886,6 +886,7 @@ module ts {
886
886
887
887
// Recurse into the source file to find the highest node at this position.
888
888
forEachChild ( sourceFile , visitNode , visitArray ) ;
889
+ return ;
889
890
890
891
function visitNode ( node : Node ) {
891
892
if ( position >= node . pos && position < node . end ) {
You can’t perform that action at this time.
0 commit comments