From b079f7c3296247bb6afc77d4aa7e75639a10e9c5 Mon Sep 17 00:00:00 2001 From: Atul R Date: Sat, 2 Jun 2018 09:45:15 +0530 Subject: [PATCH] Revert "Overiding console._errorOriginal" This reverts commit b0691073b7ae5584544a1360cdbfb8429b2bf650. --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index d62cf6d..e917cc0 100644 --- a/index.js +++ b/index.js @@ -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'); }