Skip to content

Commit

Permalink
null guard for scope ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed Jan 13, 2017
1 parent 172cce8 commit 4dcbad3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export class DebugHoverWidget implements IContentWidget {
}

// Find the most specific scope containing the range #16632
return [scopes.filter(scope => Range.containsRange(scope.range, expressionRange))
return [scopes.filter(scope => scope.range && Range.containsRange(scope.range, expressionRange))
.sort((first, second) => (first.range.endLineNumber - first.range.startLineNumber) - (second.range.endLineNumber - second.range.startLineNumber)).shift()];
})
.then(scopes => TPromise.join(scopes.map(scope => this.doFindExpression(scope, namesToFind))))
Expand Down

0 comments on commit 4dcbad3

Please sign in to comment.