Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Fix #333 - handle invalid scope locations
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Jul 3, 2018
1 parent efc117d commit 7b51042
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/transformers/baseSourceMapTransformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ export class BaseSourceMapTransformer {
}

private mapScopeLocations(pathToGenerated: string, scope: DebugProtocol.Scope): void {
if (typeof scope.line !== 'number') {
// The runtime can return invalid scope locations. Just skip those scopes. https://github.com/Microsoft/vscode-chrome-debug-core/issues/333
if (typeof scope.line !== 'number' || scope.line < 0 || scope.endLine < 0 || scope.column < 0 || scope.endColumn < 0) {
return;
}

Expand Down

0 comments on commit 7b51042

Please sign in to comment.