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: protect undefined values on SelectComponents #18808

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

christiancp100
Copy link
Contributor

What does it do?

It adds protection for possibly undefined values in SelectComponents since the default value given in packages/core/content-type-builder/admin/src/components/TabForm/index.js:

/**
    * Use undefined as the default value because not every input wants a string e.g. Date pickers
*/
const value = get(modifiedData, input.name, undefined);

Why is it needed?

Right now the CTB throws an error when creating a component inside a Dynamic Zone.

How to test it?

Try to create a component inside a dynamic zone in the CTB.

Related issue(s)/PR(s)

Closes #18633
Closes #18665

@christiancp100 christiancp100 added source: core:content-type-builder Source is core/content-type-builder package pr: fix This PR is fixing a bug labels Nov 15, 2023
@christiancp100 christiancp100 added this to the 4.15.5 milestone Nov 15, 2023
@christiancp100 christiancp100 self-assigned this Nov 15, 2023
Copy link
Contributor

github-actions bot commented Nov 15, 2023

Size Change: 0 B

Total Size: 645 kB

ℹ️ View Unchanged
Filename Size
examples/getstarted/build/bb4d0d527bdfb161bc5a.svg 2.33 kB
examples/getstarted/build/index.html 609 B
examples/getstarted/build/main.********.js 638 kB
examples/getstarted/build/runtime~main.********.js 4.27 kB

compressed-size-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix This PR is fixing a bug source: core:content-type-builder Source is core/content-type-builder package
Projects
Status: To be reviewed (Open)
Development

Successfully merging this pull request may close these issues.

None yet

3 participants