Skip to content

Commit

Permalink
Pop frames correctly in console.error handler
Browse files Browse the repository at this point in the history
Reviewed By: cpojer

Differential Revision: D16648992

fbshipit-source-id: 4581e2cd6859f27bc384fc3ab328ab5b9414c704
  • Loading branch information
motiz88 authored and facebook-github-bot committed Aug 5, 2019
1 parent e557901 commit 3eaf245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Core/ExceptionsManager.js
Expand Up @@ -134,7 +134,7 @@ function reactConsoleErrorHandler() {
}
const error: ExtendedError = new SyntheticError(str);
error.name = 'console.error';
error.framesToPop = 1;
error.framesToPop = (error.framesToPop || 0) + 1;
reportException(error, /* isFatal */ false);
}
}
Expand Down

0 comments on commit 3eaf245

Please sign in to comment.