-
Notifications
You must be signed in to change notification settings - Fork 46
Use the collection slug field name #192
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
Conversation
Signed-off-by: Cédric Boirard <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement
|
|
||
| for (const field of supportedFields) { | ||
| const value = item.fieldData[field.id] | ||
| const fieldData = item.fieldData[field.id] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: fieldDataEntry 😛 (for some follow-up PR, if any)
| const fieldData = item.fieldData[field.id] | ||
|
|
||
| switch (field.type) { | ||
| switch (fieldData.type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this safe? May it not be undefined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before it could have been but since 3.0 with strictly typed FieldData, it should never happen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fieldData.value may be undefined though
Closes https://github.com/framer/company/issues/32023
Description
This pull request ensure we export the collection slug field name (when available) instead of
Slug.Testing