Skip to content

Commit

Permalink
Merge pull request #59 from master-atul/fix/recursive
Browse files Browse the repository at this point in the history
Revert "Overiding console._errorOriginal"
  • Loading branch information
a7ul authored Jun 2, 2018
2 parents b5ff77c + b079f7c commit 176defa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export const setJSExceptionHandler = (customHandler = noop, allowedInDevMode = f
const allowed = allowedInDevMode ? true : !__DEV__;
if (allowed) {
global.ErrorUtils.setGlobalHandler(customHandler);
console.error = (error) => global.ErrorUtils.reportError(error); // sending console.error so that it can be caught
console._errorOriginal = (error) => global.ErrorUtils.reportError(error); // overiding console._errorOriginal that is used by ExceptionsManager.handleException
console.error = (message, error) => global.ErrorUtils.reportError(error); // sending console.error so that it can be caught
} else {
console.log('Skipping setJSExceptionHandler: Reason: In DEV mode and allowedInDevMode = false');
}
Expand Down

0 comments on commit 176defa

Please sign in to comment.