-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(CanvasForm): Avoid adding
{}
to the Source code
Currently, the uniforms library, initializes object fields with empty objects when there's a required property inside them. This is prevented by checking the value of the incoming change in the CanvasForm component, and while this works, it collides with the Kamelet's custom form, since the user might want to remove all annotations, leaving the form with an intended empty object. The fix for this issue is to remove said check and place it in the `setValue` function instead. The mechanism now is to check whether the value to assign is an empty object, in which case it's replaced with an `undefined` value instead. This prevents for this value to be serialized into the Source code. fix: #878
- Loading branch information
Showing
3 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters