Skip to content

Commit

Permalink
Fixed bug with finally
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorhakes committed Mar 12, 2022
1 parent 03c9a58 commit 0ededfd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions dist/polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,13 @@ var globalNS = (function() {
// https://github.com/taylorhakes/promise-polyfill/issues/114
if (typeof globalNS['Promise'] !== 'function') {
globalNS['Promise'] = Promise;
} else if (!globalNS.Promise.prototype['finally']) {
globalNS.Promise.prototype['finally'] = finallyConstructor;
} else if (!globalNS.Promise.allSettled) {
globalNS.Promise.allSettled = allSettled;
} else {
if (!globalNS.Promise.prototype['finally']) {
globalNS.Promise.prototype['finally'] = finallyConstructor;
}
if (!globalNS.Promise.allSettled) {
globalNS.Promise.allSettled = allSettled;
}
}

})));
2 changes: 1 addition & 1 deletion dist/polyfill.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "promise-polyfill",
"version": "8.2.2",
"version": "8.2.3",
"description": "Lightweight promise polyfill. A+ compliant",
"main": "lib/index.js",
"module": "src/index.js",
Expand Down

0 comments on commit 0ededfd

Please sign in to comment.