From 1f68495a171c8ee274e1da65fccb91ea928b5459 Mon Sep 17 00:00:00 2001 From: Alexander Grimalovsky Date: Wed, 22 Mar 2017 05:32:29 +0300 Subject: [PATCH] fix(addStyles): update for test for old IE versions (#196) --- addStyles.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addStyles.js b/addStyles.js index c81451da..af770cd0 100644 --- a/addStyles.js +++ b/addStyles.js @@ -11,7 +11,12 @@ var stylesInDom = {}, }; }, isOldIE = memoize(function() { - return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase()); + // Test for IE <= 9 as proposed by Browserhacks + // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 + // Tests for existence of standard globals is to allow style-loader + // to operate correctly into non-standard environments + // @see https://github.com/webpack-contrib/style-loader/issues/177 + return window && document && document.all && !window.atob; }), getElement = (function(fn) { var memo = {};