do not assume the log message is a string. fixes #29

This commit is contained in:
Artur Girenko 2016-03-21 20:55:02 +01:00
parent 09bfa49d34
commit 7fbfc7c293
1 changed files with 2 additions and 2 deletions

View File

@ -156,9 +156,9 @@ function interceptRequire() {
function compileWarningsToYellowBox() {
var log = window.console.log;
var compileWarningRx = /Figwheel: Compile Warning/;
var compileWarningRx = /Figwheel: Compile/;
window.console.log = function (msg) {
if (msg.match(compileWarningRx) != null) {
if (compileWarningRx.test(msg)) {
console.warn(msg);
} else {
log.call(window.console, msg);