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

add fetched field to async tile data #15

Merged
merged 1 commit into from
Jul 1, 2017

Conversation

Bloomca
Copy link
Owner

@Bloomca Bloomca commented Jul 1, 2017

Previously the data structure for async tile looked like the following:

{
  data: null,
  error: null,
  isPending: false,
}

The problem is that we can't keep null inside data (and all falsy values are hard to keep), so this PR moves responsibility of it to another field, fetched.
Now data structure looks like this:

{
  data: null,
  error: null,
  fetched: true,
  isPending: false,
}

So we can safely return null, and based on fetched decide whether it was done or not.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 87.317% when pulling 63cfc45 on improvement/add-fetched-field-to-async-tile-data into 66bb431 on master.

@Bloomca Bloomca merged commit 63ec716 into master Jul 1, 2017
@Bloomca Bloomca deleted the improvement/add-fetched-field-to-async-tile-data branch July 1, 2017 15:45
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