Skip to content

Commit

Permalink
fix(browser): remove variable thats undefined in react-native
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed May 26, 2016
1 parent 39ecd87 commit d39abed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ exports.colors = [

function useColors() {
// is webkit? http://stackoverflow.com/a/16459606/376773
return ('WebkitAppearance' in document.documentElement.style) ||
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return (typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style) ||
// is firebug? http://stackoverflow.com/a/398120/376773
(window.console && (console.firebug || (console.exception && console.table))) ||
// is firefox >= v31?
Expand Down

0 comments on commit d39abed

Please sign in to comment.