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

Remove orphan promise #1256

Merged
merged 2 commits into from
Feb 3, 2017
Merged

Remove orphan promise #1256

merged 2 commits into from
Feb 3, 2017

Conversation

calebmer
Copy link
Contributor

@calebmer calebmer commented Feb 3, 2017

Closes #1255

@helfer
Copy link
Contributor

helfer commented Feb 3, 2017

lgtm 👍

@helfer helfer merged commit d7ccea3 into master Feb 3, 2017
@helfer helfer removed the in progress label Feb 3, 2017
@calebmer calebmer deleted the calebmer-patch-1 branch February 3, 2017 23:39
if (isEqual(newVariables, this.variables) && !tryFetch) {
// If we have no observers, then we don't actually want to make a network
// request. As soon as someone observes the query, the request will kick
// off. For now, we just store any changes. (See #1077)
if (this.observers.length === 0) {
return nullPromise;
return new Promise((resolve) => resolve());
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this equivalent to return Promise.resolve() ?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants