Revert "MM-17519: do not stringify booleans (#3717)" (#3803)

This reverts commit 765545570f.
This commit is contained in:
Jesse Hallam 2020-01-13 16:47:24 -04:00 committed by GitHub
parent 5b149d7c96
commit 8f23aeeae5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ export default class BoolSetting extends PureComponent {
};
handleChange = (value) => {
this.props.onChange(this.props.id, Boolean(value));
this.props.onChange(this.props.id, `${value}`);
};
render() {

View file

@ -26,10 +26,10 @@ describe('components/widgets/settings/TextSetting', () => {
wrapper.instance().handleChange(false);
expect(onChange).toHaveBeenCalledTimes(1);
expect(onChange).toHaveBeenCalledWith('elementid', false);
expect(onChange).toHaveBeenCalledWith('elementid', 'false');
wrapper.instance().handleChange(true);
expect(onChange).toHaveBeenCalledTimes(2);
expect(onChange).toHaveBeenCalledWith('elementid', true);
expect(onChange).toHaveBeenCalledWith('elementid', 'true');
});
});