Merge pull request #3455 from matrix-org/t3chguy/nvl/fix_phone_numbers

Fix failure to render newly verified phone number and nested forms
pull/21833/head
David Baker 2019-09-18 09:57:19 +01:00 committed by GitHub
commit 58c333f9c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -176,6 +176,7 @@ export default class PhoneNumbers extends React.Component {
this.setState({continueDisabled: true});
const token = this.state.newPhoneNumberCode;
const address = this.state.verifyMsisdn;
this.state.addTask.haveMsisdnToken(token).then(() => {
this.setState({
addTask: null,
@ -188,7 +189,7 @@ export default class PhoneNumbers extends React.Component {
});
const msisdns = [
...this.props.msisdns,
{ address: this.state.verifyMsisdn, medium: "msisdn" },
{ address, medium: "msisdn" },
];
this.props.onMsisdnsChange(msisdns);
}).catch((err) => {
@ -272,8 +273,8 @@ export default class PhoneNumbers extends React.Component {
onChange={this._onChangeNewPhoneNumber}
/>
</div>
{addVerifySection}
</form>
{addVerifySection}
</div>
);
}