Skip to content

Conversation

@danxmoran
Copy link

Description

Instead of discarding all default/example values which are false-y, only discard those that are undefined.

Motivation and Context

Fixes #5573.

How Has This Been Tested?

The included mocha test failed before I changed the main code, and passes after. I haven't done any additional testing (I tried playing with selenium but couldn't get it to work on my machine).

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

@tim-lai
Copy link
Contributor

tim-lai commented Jun 15, 2020

@danxmoran Thanks for the PR! I tried rebasing with master, but now it fails Cypress tests in features/schema-form.js. I think it is because initialValue is now different than expected from the test. I noted in comment about the use of array. In terms of tests, I think the relevant additional mocha tests besides 0 should include, undefined, and other falsy type values.

@tim-lai
Copy link
Contributor

tim-lai commented Oct 1, 2020

superceded by #6454

@tim-lai tim-lai closed this Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

default zero not allowed in parameters

2 participants