File tree 1 file changed +3
-1
lines changed 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -125,14 +125,16 @@ function useColors() {
125
125
return false ;
126
126
}
127
127
128
+ let m ;
129
+
128
130
// Is webkit? http://stackoverflow.com/a/16459606/376773
129
131
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
130
132
return ( typeof document !== 'undefined' && document . documentElement && document . documentElement . style && document . documentElement . style . WebkitAppearance ) ||
131
133
// Is firebug? http://stackoverflow.com/a/398120/376773
132
134
( typeof window !== 'undefined' && window . console && ( window . console . firebug || ( window . console . exception && window . console . table ) ) ) ||
133
135
// Is firefox >= v31?
134
136
// 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 ) ||
136
138
// Double check webkit in userAgent just in case we are in a worker
137
139
( typeof navigator !== 'undefined' && navigator . userAgent && navigator . userAgent . toLowerCase ( ) . match ( / a p p l e w e b k i t \/ ( \d + ) / ) ) ;
138
140
}
You can’t perform that action at this time.
0 commit comments