Pop frames correctly in console.error handler

Reviewed By: cpojer

Differential Revision: D16648992

fbshipit-source-id: 4581e2cd6859f27bc384fc3ab328ab5b9414c704
This commit is contained in:
Moti Zilberman
2019-08-05 11:19:56 -07:00
committed by Facebook Github Bot
parent e557901267
commit 3eaf245540
+1 -1
View File
@@ -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);
}
}