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

[schema] Fix edge case where accessing type.preview would fail #215

Merged
merged 1 commit into from
Sep 28, 2017

Conversation

bjoerge
Copy link
Member

@bjoerge bjoerge commented Sep 28, 2017

No description provided.

@@ -39,7 +39,8 @@ function resolveFileAssetPath(typeDef) {
return fieldWithFileAsset ? `${fieldWithFileAsset.name}.asset` : undefined
}

export default function guessPreviewFields(objectTypeDef) {
export default function guessPreviewFields(rawObjectTypeDef) {
const objectTypeDef = {fields: [], ...objectTypeDef}
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be ...rawObjectTypeDef?

Copy link
Member Author

Choose a reason for hiding this comment

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

whoa 🙈 yes it should

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@bjoerge bjoerge merged commit 10401d0 into next Sep 28, 2017
@bjoerge bjoerge deleted the fix-preview-getter-error branch September 28, 2017 11:16
@bjoerge bjoerge mentioned this pull request Oct 3, 2017
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