Skip to content

Commit c8b8346

Browse files
committedMar 12, 2022
Revert "Revert "Bugfix: allSettled is not registered when finally is missing (#127)""
This reverts commit e83b46e.
1 parent 4eb2c87 commit c8b8346

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed
 

‎src/polyfill.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ var globalNS = (function() {
2525
// https://github.com/taylorhakes/promise-polyfill/issues/114
2626
if (typeof globalNS['Promise'] !== 'function') {
2727
globalNS['Promise'] = Promise;
28-
} else if (!globalNS.Promise.prototype['finally']) {
29-
globalNS.Promise.prototype['finally'] = promiseFinally;
30-
} else if (!globalNS.Promise.allSettled) {
31-
globalNS.Promise.allSettled = allSettled;
28+
} else {
29+
if (!globalNS.Promise.prototype['finally']) {
30+
globalNS.Promise.prototype['finally'] = promiseFinally;
31+
}
32+
if (!globalNS.Promise.allSettled) {
33+
globalNS.Promise.allSettled = allSettled;
34+
}
3235
}

0 commit comments

Comments
 (0)
Please sign in to comment.