Skip to content

Commit ff0068d

Browse files
committed
Merge pull request webpack-contrib#43 from mako-taco/master
Apply default singleton to IE6-8 as well
2 parents 5e375d8 + d8ada90 commit ff0068d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

addStyles.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ var stylesInDom = {},
1010
return memo;
1111
};
1212
},
13-
isIE9 = memoize(function() {
14-
return /msie 9\b/.test(window.navigator.userAgent.toLowerCase());
13+
isOldIE = memoize(function() {
14+
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
1515
}),
1616
getHeadElement = memoize(function () {
1717
return document.head || document.getElementsByTagName("head")[0];
@@ -25,9 +25,9 @@ module.exports = function(list, options) {
2525
}
2626

2727
options = options || {};
28-
// Force single-tag solution on IE9, which has a hard limit on the # of <style>
28+
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
2929
// tags it will allow on a page
30-
if (typeof options.singleton === "undefined") options.singleton = isIE9();
30+
if (typeof options.singleton === "undefined") options.singleton = isOldIE();
3131

3232
var styles = listToStyles(list);
3333
addStylesToDom(styles, options);

0 commit comments

Comments
 (0)