We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
allSettled
finally
1 parent 4eb2c87 commit c8b8346Copy full SHA for c8b8346
src/polyfill.js
@@ -25,8 +25,11 @@ var globalNS = (function() {
25
// https://github.com/taylorhakes/promise-polyfill/issues/114
26
if (typeof globalNS['Promise'] !== 'function') {
27
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;
+} else {
+ if (!globalNS.Promise.prototype['finally']) {
+ globalNS.Promise.prototype['finally'] = promiseFinally;
+ }
32
+ if (!globalNS.Promise.allSettled) {
33
+ globalNS.Promise.allSettled = allSettled;
34
35
}
0 commit comments