Deploy v0.30.0

Reviewed By: avikchaudhuri

Differential Revision: D3654213

fbshipit-source-id: b03879345ad9beae73a055c1b2e7211d074a08f0
This commit is contained in:
Gabe Levi
2016-08-02 20:46:16 -07:00
committed by Facebook Github Bot 9
parent c2cf510ff8
commit e34dd4f938
3 changed files with 10 additions and 7 deletions

View File

@@ -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
}
}