Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Deepclone default value for custom-components #29

Merged
merged 1 commit into from
Feb 11, 2019
Merged

Deepclone default value for custom-components #29

merged 1 commit into from
Feb 11, 2019

Conversation

rtucek
Copy link
Contributor

@rtucek rtucek commented Aug 22, 2018

This fixes 2 edge-cases with custom components and their default value:

  • If default is falsy (i.e. '', 0 or 0.0) it's replaced with null,
    which may break the custom-component or violates its prop validation.
  • If default is non-primitive, a newly created rule of the same ID would
    receive a mutated, default value form the previous rule.

This fixes 2 edge-cases with custom components and their default value:

 * If default is falsy (i.e. `''`, `0` or `0.0`) it's replaced with `null`,
   which may break the custom-component or or violates its prop validation.
 * If default is non-primitive, a newly created rule of the same ID would
   receive a mutated, default value form the previous rule.
@dabernathy89
Copy link
Owner

Thanks @rtucek! I'll check this out this weekend.

@dabernathy89 dabernathy89 merged commit 1d4e5b6 into dabernathy89:master Feb 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants