Skip to content

Commit e4b8bb9

Browse files
escwaldthebigredgeek
authored andcommitted
Fix #363 (#364)
1 parent 4c3e80d commit e4b8bb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

browser.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ function useColors() {
4444
(typeof window !== 'undefined' && window.console && (console.firebug || (console.exception && console.table))) ||
4545
// is firefox >= v31?
4646
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
47-
(navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
47+
(navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
4848
// double check webkit in userAgent just in case we are in a worker
49-
(navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
49+
(navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
5050
}
5151

5252
/**

0 commit comments

Comments
 (0)