Skip to content

Commit

Permalink
fix: navigation loop when error on joining muc
Browse files Browse the repository at this point in the history
  • Loading branch information
nioc committed Feb 2, 2023
1 parent 65ec4b8 commit 4a6cc54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/components/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ export default {
}
return this.$router.push({ name: 'home' })
}
if (history.state && history.state.back) {
return this.$router.replace({ path: history.state.back })
}
return this.$router.back()
},
// scroll to last message (called when messages changes)
Expand Down
2 changes: 1 addition & 1 deletion src/components/GuestChat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
},
created () {
if (this.$xmpp.nick === null) {
this.$router.back()
this.$router.replace({ name: 'guest', query: { join: this.jid } })
}
},
mounted () {
Expand Down

0 comments on commit 4a6cc54

Please sign in to comment.