Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix improper splice when determining vias for tombstones (#7159)
Browse files Browse the repository at this point in the history
`splice` takes one element from the array whereas `slice` takes all after a given point. We want `slice` so we can pick up ipv6 addresses and port numbers.
  • Loading branch information
turt2live authored Nov 18, 2021
1 parent 256c468 commit 28d7a51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/views/rooms/MessageComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export default class MessageComposer extends React.Component<IProps, IState> {
if (createEvent && createEvent.getId()) createEventId = createEvent.getId();
}

const viaServers = [this.state.tombstone.getSender().split(':').splice(1).join(':')];
const viaServers = [this.state.tombstone.getSender().split(':').slice(1).join(':')];
dis.dispatch({
action: 'view_room',
highlighted: true,
Expand Down

0 comments on commit 28d7a51

Please sign in to comment.