We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c3e80d commit e4b8bb9Copy full SHA for e4b8bb9
browser.js
@@ -44,9 +44,9 @@ function useColors() {
44
(typeof window !== 'undefined' && window.console && (console.firebug || (console.exception && console.table))) ||
45
// is firefox >= v31?
46
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
47
- (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ (navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
48
// double check webkit in userAgent just in case we are in a worker
49
- (navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+ (navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
50
}
51
52
/**
0 commit comments