From 3baaaaab079257eed7ea8edf9faf4f77b8fc8d09 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 11 Mar 2020 12:03:16 +0100 Subject: [PATCH] use splice correctly after removing a local alias --- src/components/views/room_settings/AliasSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/room_settings/AliasSettings.js b/src/components/views/room_settings/AliasSettings.js index 0a7bd1d333..1d6b29c3ce 100644 --- a/src/components/views/room_settings/AliasSettings.js +++ b/src/components/views/room_settings/AliasSettings.js @@ -235,7 +235,7 @@ export default class AliasSettings extends React.Component { // to this room. See https://github.com/vector-im/riot-web/issues/7353 MatrixClientPeg.get().deleteAlias(alias).then(() => { const localAliases = this.state.localAliases.slice(); - localAliases.splice(index); + localAliases.splice(index, 1); this.setState({localAliases}); if (this.state.canonicalAlias === alias) {