Skip to content

Commit 11df00f

Browse files
committedMar 12, 2022
Revert "Add new dist"
This reverts commit a78ac02.
1 parent e83b46e commit 11df00f

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed
 

‎dist/polyfill.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ function allSettled(arr) {
7777
// Store setTimeout reference so promise-polyfill will be unaffected by
7878
// other code modifying setTimeout (like sinon.useFakeTimers())
7979
var setTimeoutFunc = setTimeout;
80-
// @ts-ignore
81-
var setImmediateFunc = typeof setImmediate !== 'undefined' ? setImmediate : null;
8280

8381
function isArray(x) {
8482
return Boolean(x && typeof x.length !== 'undefined');
@@ -312,10 +310,10 @@ Promise.race = function(arr) {
312310
// Use polyfill for setImmediate for performance gains
313311
Promise._immediateFn =
314312
// @ts-ignore
315-
(typeof setImmediateFunc === 'function' &&
313+
(typeof setImmediate === 'function' &&
316314
function(fn) {
317315
// @ts-ignore
318-
setImmediateFunc(fn);
316+
setImmediate(fn);
319317
}) ||
320318
function(fn) {
321319
setTimeoutFunc(fn, 0);
@@ -350,13 +348,10 @@ var globalNS = (function() {
350348
// https://github.com/taylorhakes/promise-polyfill/issues/114
351349
if (typeof globalNS['Promise'] !== 'function') {
352350
globalNS['Promise'] = Promise;
353-
} else {
354-
if (!globalNS.Promise.prototype['finally']) {
355-
globalNS.Promise.prototype['finally'] = finallyConstructor;
356-
}
357-
if (!globalNS.Promise.allSettled) {
358-
globalNS.Promise.allSettled = allSettled;
359-
}
351+
} else if (!globalNS.Promise.prototype['finally']) {
352+
globalNS.Promise.prototype['finally'] = finallyConstructor;
353+
} else if (!globalNS.Promise.allSettled) {
354+
globalNS.Promise.allSettled = allSettled;
360355
}
361356

362357
})));

‎dist/polyfill.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.