From 3eaf2455402b5ad73c8a059311f0cb213df9dd28 Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Mon, 5 Aug 2019 11:12:50 -0700 Subject: [PATCH] Pop frames correctly in console.error handler Reviewed By: cpojer Differential Revision: D16648992 fbshipit-source-id: 4581e2cd6859f27bc384fc3ab328ab5b9414c704 --- Libraries/Core/ExceptionsManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Core/ExceptionsManager.js b/Libraries/Core/ExceptionsManager.js index 1eef1d96824..58c7b22612f 100644 --- a/Libraries/Core/ExceptionsManager.js +++ b/Libraries/Core/ExceptionsManager.js @@ -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); } }