1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

Don't assume false means "use state"

Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Travis Ralston
2017-11-04 19:52:42 -07:00
parent ef45d82ec6
commit 45140cab69
2 changed files with 5 additions and 5 deletions

View File

@@ -54,12 +54,12 @@ module.exports = React.createClass({
if (this.props.onChange) this.props.onChange(newState);
},
save: function(val = null) {
save: function(val = undefined) {
return SettingsStore.setValue(
this.props.name,
this.props.roomId,
this.props.level,
val ? val : this.state.value
val !== undefined ? val : this.state.value
);
},