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(core/presentation): Fix null reference in FieldLayout components #7529

Conversation

christopherthielen
Copy link
Contributor

@christopherthielen christopherthielen commented Oct 15, 2019

The fix was adding a default value when destructuring the validation prop

const { label, help, input, actions, validation = {} } = props;
const { hidden, messageNode, category } = validation;

Also converted to functional components

Copy link
Member

@erikmunson erikmunson left a comment

Choose a reason for hiding this comment

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

that simple huh? cool!

is the rest just prettier being aggressive?

@christopherthielen
Copy link
Contributor Author

is the rest just prettier being aggressive?

switched from class component to functional component

@erikmunson
Copy link
Member

ah thanks, see that now. enough noise that my skimming didn't catch :)

@christopherthielen christopherthielen merged commit 64d88cc into spinnaker:master Oct 15, 2019
@christopherthielen christopherthielen deleted the fix-standard-field-layout-validation-props branch October 15, 2019 21:32
@caseyhebebrand
Copy link
Contributor

switched from class component to functional component

Nice! I am a huge fan of using functional components where possible. They help to reduce bundle size and custom hooks will help unlock abstraction, which I see being a big advantage for migrating controller logic that is now replicated across providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants