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:
Kegan Dougal 2016-02-05 16:22:24 +00:00
parent ac67cd556a
commit 5dafe1f4a6

View file

@ -204,6 +204,7 @@ module.exports = React.createClass({
if (this.props.canSetCanonicalAlias) { if (this.props.canSetCanonicalAlias) {
canonical_alias_section = ( canonical_alias_section = (
<select onChange={this.onCanonicalAliasChange} defaultValue={ this.state.canonicalAlias }> <select onChange={this.onCanonicalAliasChange} defaultValue={ this.state.canonicalAlias }>
<option value="" key="unset">not specified</option>
{ {
Object.keys(self.state.domainToAliases).map(function(domain, i) { Object.keys(self.state.domainToAliases).map(function(domain, i) {
return self.state.domainToAliases[domain].map(function(alias, j) { 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> </select>
); );
} }