File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,12 @@ function useColors() {
42
42
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
43
43
return ( typeof document !== 'undefined' && 'WebkitAppearance' in document . documentElement . style ) ||
44
44
// 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 ) ) ) ||
46
46
// is firefox >= v31?
47
47
// 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 + ) / ) ) ;
49
51
}
50
52
51
53
/**
You can’t perform that action at this time.
0 commit comments