Skip to content

Commit 5d4243b

Browse files
committed
Fix for Angular's ZoneAwarePromise implementation
1 parent 273d22b commit 5d4243b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ Worker.prototype.thenCore = function thenCore(onFulfilled, onRejected) {
434434
if (onRejected) { onRejected = onRejected.bind(self); }
435435

436436
// Cast self into a Promise to avoid polyfills recursively defining `then`.
437-
var selfPromise = (Promise.toString().indexOf('[native code]') === -1) ?
437+
var selfPromise = (Promise.toString() !== 'function Promise() { [native code] }') ?
438438
Worker.convert(Object.assign({}, self), Promise.prototype) : self;
439439

440440
// Return the promise, after casting it into a Worker and preserving props.

0 commit comments

Comments
 (0)