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

Check for schema and set default to {} in useDatastore #200

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

dgading
Copy link
Member

@dgading dgading commented Apr 22, 2024

If a dataset was visited before the cron tasks had built it there were two places looking at schema[id] could fail:

  1. Line 58, needed to check for schema before checking for the id key
  2. the original default for schema in useDatastore was an empty object, but on line 65 it would be set to null or undefined which would then break every component that was looking for keys in the resource.schema object.

Copy link
Contributor

@dcgoodwin2112 dcgoodwin2112 left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@dgading dgading merged commit cc38ef3 into main Apr 22, 2024
1 check passed
@dgading dgading deleted the fix-missing-schema-error branch April 22, 2024 19: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.

2 participants