Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore) - Remove scheduleTask helpers #861

Merged
merged 3 commits into from
Jun 12, 2020

Conversation

kitten
Copy link
Member

@kitten kitten commented Jun 12, 2020

Removes the scheduleTask ponyfill helpers in favour of inline Promise.resolve().then(fn) calls.

The scheduleTask helper was useful because globally we can't
tell whether Promise has been polyfilled for IE11 yet.
However, where this is called we can already be sure of
it being polyfilled, which we do assume in other places
of the codebase.
Therefore it's safe to replace the scheduleTask polyfill
with a simple inline Promise.resolve().then(fn) call, which
is also more obvious.

kitten added 2 commits June 12, 2020 16:06
The scheduleTask helper was useful because globally we can't
tell whether `Promise` has been polyfilled for IE11 yet.
However, where this is called we _can_ already be sure of
it being polyfilled, which we do assume in other places
of the codebase.
Therefore it's safe to replace the `scheduleTask` polyfill
with a simple inline `Promise.resolve().then(fn)` call, which
is also more obvious.
@kitten kitten requested a review from JoviDeCroock June 12, 2020 16:17
@changeset-bot
Copy link

changeset-bot bot commented Jun 12, 2020

🦋 Changeset is good to go

Latest commit: 5fcf124

We got this.

This PR includes changesets to release 2 packages
Name Type
@urql/exchange-graphcache Patch
@urql/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kitten kitten merged commit c3dbd2a into master Jun 12, 2020
@kitten kitten deleted the chore/remove-schedule-task-defer branch June 12, 2020 16:52
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.

2 participants