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

[base] Fix wrong typeof check #1828

Merged
merged 1 commit into from
Apr 6, 2020
Merged

[base] Fix wrong typeof check #1828

merged 1 commit into from
Apr 6, 2020

Conversation

bjoerge
Copy link
Member

@bjoerge bjoerge commented Apr 6, 2020

Currently, when restoring a document from the revision history we look through the restored version for references to check if they still exist. Due to an erroneous typeof check, which should have been a falsey check, any null values in the restored version would throw an error saying Cannot read property _ref of null.

Type of change (check at least one)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or update to documentation)
  • Maintenance
  • Other, please describe:

Note for release
Fixed a bug that would cause an error when trying to restore a document that has null values.

@bjoerge bjoerge requested a review from thomax April 6, 2020 10:32
@vercel
Copy link

vercel bot commented Apr 6, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/sanity-io/test-studio/apftk9crn
✅ Preview: https://test-studio-git-fix-wrong-typeof-check.sanity-io.now.sh

@bjoerge bjoerge merged commit 379ba25 into master Apr 6, 2020
@bjoerge bjoerge deleted the fix-wrong-typeof-check branch April 6, 2020 10:43
Copy link
Contributor

@thomax thomax left a comment

Choose a reason for hiding this comment

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

👍

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.

None yet

2 participants