File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -125,14 +125,16 @@ function useColors() {
125125 return false ;
126126 }
127127
128+ let m ;
129+
128130 // Is webkit? http://stackoverflow.com/a/16459606/376773
129131 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
130132 return ( typeof document !== 'undefined' && document . documentElement && document . documentElement . style && document . documentElement . style . WebkitAppearance ) ||
131133 // Is firebug? http://stackoverflow.com/a/398120/376773
132134 ( typeof window !== 'undefined' && window . console && ( window . console . firebug || ( window . console . exception && window . console . table ) ) ) ||
133135 // Is firefox >= v31?
134136 // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
135- ( typeof navigator !== 'undefined' && navigator . userAgent && navigator . userAgent . toLowerCase ( ) . match ( / f i r e f o x \/ ( \d + ) / ) && parseInt ( RegExp . $1 , 10 ) >= 31 ) ||
137+ ( typeof navigator !== 'undefined' && navigator . userAgent && ( m = navigator . userAgent . toLowerCase ( ) . match ( / f i r e f o x \/ ( \d + ) / ) ) && parseInt ( m [ 1 ] , 10 ) >= 31 ) ||
136138 // Double check webkit in userAgent just in case we are in a worker
137139 ( typeof navigator !== 'undefined' && navigator . userAgent && navigator . userAgent . toLowerCase ( ) . match ( / a p p l e w e b k i t \/ ( \d + ) / ) ) ;
138140}
You can’t perform that action at this time.
0 commit comments