Comparing version 2.6.7 to 2.6.8
2.6.8 / 2017-05-18 | ||
================== | ||
* Fix: Check for undefined on browser globals (#462, @marbemac) | ||
2.6.7 / 2017-05-16 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -5,3 +5,3 @@ { | ||
"description": "small debugging utility", | ||
"version": "2.6.7", | ||
"version": "2.6.8", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "debug", |
{ | ||
"name": "debug", | ||
"version": "2.6.7", | ||
"version": "2.6.8", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -43,3 +43,3 @@ /** | ||
// explicitly | ||
if (window && window.process && window.process.type === 'renderer') { | ||
if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { | ||
return true; | ||
@@ -50,10 +50,10 @@ } | ||
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 | ||
return (document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || | ||
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || | ||
// is firebug? http://stackoverflow.com/a/398120/376773 | ||
(window && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || | ||
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || | ||
// is firefox >= v31? | ||
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages | ||
(navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || | ||
(typeof navigator !== 'undefined' && 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 && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); | ||
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); | ||
} | ||
@@ -60,0 +60,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50736