This commit is contained in:
Erik Karlsson 2016-12-14 22:27:54 +01:00 committed by Andrew E. Rhyne
parent 4c3e80dfaa
commit e4b8bb9a23

View File

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