mirror of https://github.com/status-im/metro.git
[ReactNative] Don't redbox for React warnings when not using Chrome executor
This commit is contained in:
parent
4a0ff6a7d1
commit
801dd2d133
|
@ -376,6 +376,12 @@
|
|||
var str = Array.prototype.map.call(arguments, function(arg) {
|
||||
return inspect(arg, {depth: 10});
|
||||
}).join(', ');
|
||||
if (str.slice(0, 10) === "'Warning: " && level >= LOG_LEVELS.error) {
|
||||
// React warnings use console.error so that a stack trace is shown,
|
||||
// but we don't (currently) want these to show a redbox
|
||||
// (Note: Logic duplicated in ExceptionsManager.js.)
|
||||
level = LOG_LEVELS.warn;
|
||||
}
|
||||
global.nativeLoggingHook(str, level);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue