[ReactNative] Update core RN modules to work with React 0.14-beta1

This commit is contained in:
Ben Alpert
2015-07-23 17:50:16 -07:00
parent 710d29efae
commit e01f90784f
9 changed files with 78 additions and 56 deletions

View File

@@ -85,6 +85,11 @@ function installConsoleErrorReporter() {
return;
}
var str = Array.prototype.map.call(arguments, stringifySafe).join(', ');
if (str.slice(0, 10) === '"Warning: ') {
// React warnings use console.error so that a stack trace is shown, but
// we don't (currently) want these to show a redbox
return;
}
var error: any = new Error('console.error: ' + str);
error.framesToPop = 1;
reportException(error, /* isFatal */ false);