From 4dcbad30075e742cc666ecb4b51709c0ad7403a3 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 13 Jan 2017 10:40:56 +0100 Subject: [PATCH] null guard for scope ranges --- src/vs/workbench/parts/debug/electron-browser/debugHover.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 344ef9cf51a91..4a9399654295b 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -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))))