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

fix: fix missing body field (#13) #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kjetilhartveit
Copy link

I thought transformType() used with reduce() is generally hard to understand so I might miss something(?), but as the body widget is usually string it should be covered by the next block statement if (typeof widget.type === "string") { .... This seems to fix the issue and the body is including in the generated types.

@kjetilhartveit
Copy link
Author

kjetilhartveit commented Feb 27, 2023

Or, is this behavior "expected", as one is most likely storing the items as frontmatter files and when retrieving them the content is separated from the metadata? It was just unexpected for me as a first time user and not clear why body wasn't generated. I was expecting the types to fully reflect the config. If this is intentional behavior then it should be documented and preferably customizable?

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.

1 participant