File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,10 +42,12 @@ function useColors() {
4242 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
4343 return ( typeof document !== 'undefined' && 'WebkitAppearance' in document . documentElement . style ) ||
4444 // is firebug? http://stackoverflow.com/a/398120/376773
45- ( window . console && ( console . firebug || ( console . exception && console . table ) ) ) ||
45+ ( typeof window !== 'undefined' && window . console && ( console . firebug || ( console . exception && console . table ) ) ) ||
4646 // is firefox >= v31?
4747 // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
48- ( navigator . userAgent . toLowerCase ( ) . match ( / f i r e f o x \/ ( \d + ) / ) && parseInt ( RegExp . $1 , 10 ) >= 31 ) ;
48+ ( navigator . userAgent . toLowerCase ( ) . match ( / f i r e f o x \/ ( \d + ) / ) && parseInt ( RegExp . $1 , 10 ) >= 31 ) ||
49+ // double check webkit in userAgent just in case we are in a worker
50+ ( navigator . userAgent . toLowerCase ( ) . match ( / a p p l e w e b k i t \/ ( \d + ) / ) ) ;
4951}
5052
5153/**
You can’t perform that action at this time.
0 commit comments