Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit 8eb0d55

Browse files
committed
Webworker ios7 fixes (#361)
1 parent 57675e9 commit 8eb0d55

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/polyfill-wrapper-end.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ function __eval(__source, __global, __load) {
1212
}
1313
}
1414

15-
})(typeof window != 'undefined' ? window : (typeof WorkerGlobalScope != 'undefined' ?
16-
self : global));
15+
})(typeof window != 'undefined' ? window : (typeof global != 'undefined' ? global : self));

src/system.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212

1313
(function() {
1414

15-
var isWorker = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;
16-
var isBrowser = typeof window != 'undefined' && !isWorker;
15+
var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
1716
var isWindows = typeof process != 'undefined' && !!process.platform.match(/^win/);
1817
var Promise = __global.Promise || require('when/es6-shim/Promise');
1918

@@ -155,7 +154,7 @@
155154
}
156155

157156
get global() {
158-
return isBrowser ? window : (isWorker ? self : __global);
157+
return __global;
159158
}
160159

161160
get strict() { return true; }
@@ -278,7 +277,7 @@
278277

279278
// <script type="module"> support
280279
// allow a data-init function callback once loaded
281-
if (isBrowser && typeof document.getElementsByTagName != 'undefined') {
280+
if (isBrowser && document.getElementsByTagName) {
282281
var curScript = document.getElementsByTagName('script');
283282
curScript = curScript[curScript.length - 1];
284283

0 commit comments

Comments
 (0)