From 9dc45a6dee16553a64071031d18feb1562df86a2 Mon Sep 17 00:00:00 2001 From: Oskar Eriksson Date: Sat, 1 Oct 2016 21:27:01 +0200 Subject: [PATCH] Replace window with self for better web worker support --- addStyles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addStyles.js b/addStyles.js index ef4fd5f..8d45277 100644 --- a/addStyles.js +++ b/addStyles.js @@ -11,7 +11,7 @@ var stylesInDom = {}, }; }, isOldIE = memoize(function() { - return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase()); + return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase()); }), getHeadElement = memoize(function () { return document.head || document.getElementsByTagName("head")[0];