twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
Other
23.11k stars 2.42k forks source link

Fix array edit option #8600

Open BKM14 opened 2 days ago

BKM14 commented 2 days ago

Closes #8578 There was no case to handle a FieldMetadataType.Array and thus an error was thrown every time the edit button was clicked on an Array type. It has been added now.

BKM14 commented 10 hours ago

Hey @ehconitin, could you review this please?

BKM14 commented 8 hours ago

There is an explicit break for the Array though. If it applies for Email, won't it also apply for Array

ehconitin commented 29 minutes ago

To clarify - currently, there isn't a separate break for Array. The code falls through from the Array case to the Email case, sharing a single break statement. While they handle the input the same way now, having separate cases with explicit breaks would make the code's intention clearer and easier to maintain.

What if in the future email break conditions change??? Your code will break in that situation :)