mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-26 17:01:49 +02:00
Fix an error where React doesn't like value=null on a select
This only happens when there are no canonical aliases for a room.
This commit is contained in:
parent
2ec9745939
commit
49efefa630
@ -220,8 +220,9 @@ module.exports = React.createClass({
|
|||||||
let canonical_alias_section;
|
let canonical_alias_section;
|
||||||
if (this.props.canSetCanonicalAlias) {
|
if (this.props.canSetCanonicalAlias) {
|
||||||
let found = false;
|
let found = false;
|
||||||
|
const canonicalValue = this.state.canonicalAlias || "";
|
||||||
canonical_alias_section = (
|
canonical_alias_section = (
|
||||||
<select onChange={this.onCanonicalAliasChange} value={this.state.canonicalAlias}>
|
<select onChange={this.onCanonicalAliasChange} value={canonicalValue}>
|
||||||
<option value="" key="unset">{ _t('not specified') }</option>
|
<option value="" key="unset">{ _t('not specified') }</option>
|
||||||
{
|
{
|
||||||
Object.keys(self.state.domainToAliases).map((domain, i) => {
|
Object.keys(self.state.domainToAliases).map((domain, i) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user