Skip to content

Commit b3ea123

Browse files
ibcTooTallNate
authored andcommitted
Disable colors in Edge and Internet Explorer (#489)
Fixes #417.
1 parent 13e1d06 commit b3ea123

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/browser.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ function useColors() {
4949
return true;
5050
}
5151

52+
// Internet Explorer and Edge do not support colors.
53+
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
54+
return false;
55+
}
56+
5257
// is webkit? http://stackoverflow.com/a/16459606/376773
5358
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
5459
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||

0 commit comments

Comments
 (0)