diff --git a/src/browser.js b/src/browser.js index ac3f7e13..c7dd5750 100644 --- a/src/browser.js +++ b/src/browser.js @@ -124,7 +124,9 @@ function useColors() { // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)) || + // Check if we're being used in ReactNative + (typeof navigator !== 'undefined' && navigator.product && navigator.product.toLowerCase() === 'reactnative'); } /**