Merge pull request #3449 from matrix-org/jryans/picker-types-regression

Fix address type props to state conversion
This commit is contained in:
J. Ryan Stinnett 2019-09-17 15:44:41 +01:00 committed by GitHub
commit b1618056c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,7 +80,7 @@ module.exports = createReactClass({
let validAddressTypes = this.props.validAddressTypes; let validAddressTypes = this.props.validAddressTypes;
// Remove email from validAddressTypes if no IS is configured. It may be added at a later stage by the user // Remove email from validAddressTypes if no IS is configured. It may be added at a later stage by the user
if (!MatrixClientPeg.get().getIdentityServerUrl() && validAddressTypes.includes("email")) { if (!MatrixClientPeg.get().getIdentityServerUrl() && validAddressTypes.includes("email")) {
validAddressTypes = validAddressTypes.splice(validAddressTypes.indexOf("email"), 1); validAddressTypes = validAddressTypes.filter(type => type !== "email");
} }
return { return {