Skip to content

Commit

Permalink
Merge pull request #3432 from mshaaban088/master
Browse files Browse the repository at this point in the history
Serialize boolean type only for non-nullable values
  • Loading branch information
Hypnosphi authored Apr 16, 2018
2 parents c7ff3cb + 2a13294 commit 0f344ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/knobs/src/components/types/Boolean.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ BooleanType.propTypes = {
onChange: PropTypes.func,
};

BooleanType.serialize = value => String(value);
BooleanType.serialize = value => (value ? String(value) : null);
BooleanType.deserialize = value => value === 'true';

export default BooleanType;

0 comments on commit 0f344ba

Please sign in to comment.