Skip to content

Fix undefined Promise.prototype.finally when using promise rejection tracking#60

Merged
Callum-McKay merged 1 commit intomasterfrom
fix-promise-finally-undefined
May 18, 2022
Merged

Fix undefined Promise.prototype.finally when using promise rejection tracking#60
Callum-McKay merged 1 commit intomasterfrom
fix-promise-finally-undefined

Conversation

@Widdershin
Copy link
Contributor

When tracking unhandled Promise rejections, we polyfill the Promise global.
The promise polyfill module is split into a number of submodules, that
implement different parts of the Promise specification.

As we were only requiring es6-extensions, Promise.prototype.finally and
Promise.prototype.done were not defined. We can fix this by requiring
the done and finally implementations from the promise module.

Fixes #42

When tracking unhandled Promise rejections, we polyfill the Promise global.
The `promise` polyfill module is split into a number of submodules, that
implement different parts of the Promise specification.

As we were only requiring es6-extensions, Promise.prototype.finally and
Promise.prototype.done were not defined. We can fix this by requiring
the done and finally implementations from the `promise` module.
@Widdershin Widdershin requested a review from Callum-McKay May 18, 2022 05:11
Copy link
Contributor

@Callum-McKay Callum-McKay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Callum-McKay Callum-McKay merged commit 8199019 into master May 18, 2022
@sumitramanga sumitramanga deleted the fix-promise-finally-undefined branch October 17, 2023 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Promise finally error when disableUnhandledPromiseRejectionReporting: false setting enabled in Apollo Client networking code.

2 participants