You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
use splice correctly after removing a local alias
This commit is contained in:
@@ -235,7 +235,7 @@ export default class AliasSettings extends React.Component {
|
|||||||
// to this room. See https://github.com/vector-im/riot-web/issues/7353
|
// to this room. See https://github.com/vector-im/riot-web/issues/7353
|
||||||
MatrixClientPeg.get().deleteAlias(alias).then(() => {
|
MatrixClientPeg.get().deleteAlias(alias).then(() => {
|
||||||
const localAliases = this.state.localAliases.slice();
|
const localAliases = this.state.localAliases.slice();
|
||||||
localAliases.splice(index);
|
localAliases.splice(index, 1);
|
||||||
this.setState({localAliases});
|
this.setState({localAliases});
|
||||||
|
|
||||||
if (this.state.canonicalAlias === alias) {
|
if (this.state.canonicalAlias === alias) {
|
||||||
|
|||||||
Reference in New Issue
Block a user