mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-01 22:41:28 +08:00
Deploy v0.30.0
Reviewed By: avikchaudhuri Differential Revision: D3654213 fbshipit-source-id: b03879345ad9beae73a055c1b2e7211d074a08f0
This commit is contained in:
committed by
Facebook Github Bot 9
parent
c2cf510ff8
commit
e34dd4f938
@@ -71,9 +71,11 @@ function installConsoleErrorReporter() {
|
||||
if (console._errorOriginal) {
|
||||
return; // already installed
|
||||
}
|
||||
console._errorOriginal = console.error.bind(console);
|
||||
// Flow doesn't like it when you set arbitrary values on a global object
|
||||
(console: any)._errorOriginal = console.error.bind(console);
|
||||
console.error = function reactConsoleError() {
|
||||
console._errorOriginal.apply(null, arguments);
|
||||
// Flow doesn't like it when you set arbitrary values on a global object
|
||||
(console: any)._errorOriginal.apply(null, arguments);
|
||||
if (!console.reportErrorsAsExceptions) {
|
||||
return;
|
||||
}
|
||||
@@ -95,7 +97,8 @@ function installConsoleErrorReporter() {
|
||||
}
|
||||
};
|
||||
if (console.reportErrorsAsExceptions === undefined) {
|
||||
console.reportErrorsAsExceptions = true; // Individual apps can disable this
|
||||
// Flow doesn't like it when you set arbitrary values on a global object
|
||||
(console: any).reportErrorsAsExceptions = true; // Individual apps can disable this
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user