Skip to content

Commit

Permalink
Revert "Overiding console._errorOriginal"
Browse files Browse the repository at this point in the history
This reverts commit b069107.
  • Loading branch information
a7ul committed Jun 2, 2018
1 parent b5ff77c commit b079f7c
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 b079f7c

Please sign in to comment.