From 650b220b567ff466dbd6ddfd7b8ae7014a80feba Mon Sep 17 00:00:00 2001 From: guybedford Date: Thu, 23 Apr 2015 13:30:10 +0200 Subject: [PATCH] web worker adjustment for ios7 (#409) --- lib/extension-core.js | 2 +- lib/polyfill-wrapper-end.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/extension-core.js b/lib/extension-core.js index f841ce36..b2af47fb 100644 --- a/lib/extension-core.js +++ b/lib/extension-core.js @@ -68,7 +68,7 @@ function core(loader) { // override locate to allow baseURL to be document-relative var baseURI; if (typeof window == 'undefined' && - typeof WorkerGlobalScope == 'undefined') { + typeof WorkerGlobalScope == 'undefined' && typeof process != 'undefined') { baseURI = 'file:' + process.cwd() + '/'; if (isWindows) baseURI = baseURI.replace(/\\/g, '/'); diff --git a/lib/polyfill-wrapper-end.js b/lib/polyfill-wrapper-end.js index e311a56f..a8d659e0 100644 --- a/lib/polyfill-wrapper-end.js +++ b/lib/polyfill-wrapper-end.js @@ -60,7 +60,7 @@ var $__curScript, __eval; $__global.upgradeSystemLoader(); } } - else if (typeof WorkerGlobalScope != 'undefined' && typeof importScripts != 'undefined') { + else if (typeof importScripts != 'undefined') { doEval = function(source) { try { eval(source); @@ -99,4 +99,4 @@ var $__curScript, __eval; } })(); -})(typeof window != 'undefined' ? window : (typeof WorkerGlobalScope != 'undefined' ? self : global)); +})(typeof window != 'undefined' ? window : (typeof global != 'undefined' ? global : self));