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(renderField): use field.localized #35

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

Conversation

zernie
Copy link
Contributor

@zernie zernie commented Jun 3, 2020

There is a bug in the --localization flag - it does not take field.localized into consideration.


This change is Reviewable

@@ -3,7 +3,8 @@ export default function renderLocalizedTypes(localization: boolean) {
if (!localization) return null

return `
export type LocalizedField<T> = Partial<Record<LOCALE_CODE, T>>
export type DefaultLocalizedField<T> = Record<CONTENTFUL_DEFAULT_LOCALE_CODE, T>
Copy link
Contributor Author

@zernie zernie Jun 5, 2020

Choose a reason for hiding this comment

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

When we're using locale=* even non-localized fields will be rendered as


"field": {
   "<CONTENTFUL_DEFAULT_LOCALE_CODE>": "value"
},

@zernie
Copy link
Contributor Author

zernie commented Aug 25, 2020

hey @stevenpetryk, could you please take a look?

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