You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Fix canonical alias bug showing the first alias if one was not set.
<select> rests on the first value if the defaultValue is null. This first value should've been 'not set'.
This commit is contained in:
@@ -204,6 +204,7 @@ module.exports = React.createClass({
|
||||
if (this.props.canSetCanonicalAlias) {
|
||||
canonical_alias_section = (
|
||||
<select onChange={this.onCanonicalAliasChange} defaultValue={ this.state.canonicalAlias }>
|
||||
<option value="" key="unset">not specified</option>
|
||||
{
|
||||
Object.keys(self.state.domainToAliases).map(function(domain, i) {
|
||||
return self.state.domainToAliases[domain].map(function(alias, j) {
|
||||
@@ -215,7 +216,6 @@ module.exports = React.createClass({
|
||||
});
|
||||
})
|
||||
}
|
||||
<option value="" key="unset">not specified</option>
|
||||
</select>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user