Fix order of object override when copying identity server terms state (#8619)

Fixes https://github.com/vector-im/element-web/issues/20003
This commit is contained in:
Travis Ralston 2022-05-17 00:20:16 -06:00 committed by GitHub
parent 5f8aecaf08
commit 2bddadc14e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,8 +211,8 @@ export default class GeneralUserSettingsTab extends React.Component<IProps, ISta
// User accepted all terms
this.setState({
requiredPolicyInfo: {
...this.state.requiredPolicyInfo, // set first so we can override
hasTerms: false,
...this.state.requiredPolicyInfo,
},
});
} catch (e) {