Skip to content

Commit 1f68495

Browse files
FlyingDRmichael-ciniawsky
authored andcommitted
fix(addStyles): update for test for old IE versions (#196)
1 parent b153070 commit 1f68495

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

addStyles.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ var stylesInDom = {},
1111
};
1212
},
1313
isOldIE = memoize(function() {
14-
return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase());
14+
// Test for IE <= 9 as proposed by Browserhacks
15+
// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
16+
// Tests for existence of standard globals is to allow style-loader
17+
// to operate correctly into non-standard environments
18+
// @see https://github.com/webpack-contrib/style-loader/issues/177
19+
return window && document && document.all && !window.atob;
1520
}),
1621
getElement = (function(fn) {
1722
var memo = {};

0 commit comments

Comments
 (0)