Safety checks on autojoin

This commit is contained in:
Sam Calder-Mason 2018-07-21 14:20:44 +10:00
parent 841d03cdec
commit 1f8db9b70e
1 changed files with 8 additions and 6 deletions

View File

@ -197,13 +197,15 @@ export default {
return this.$router.push('/signin')
}
console.log('Settings', settings)
if (settings.autoJoin) {
await this.$store.dispatch('autoJoin', {
if (settings.autoJoin === true || settings.autoJoin === 'true') {
if (settings.autoJoinServer) {
this.$store.dispatch('autoJoin', {
server: settings.autoJoinServer,
password: settings.autoJoinPassword,
room: settings.autoJoinRoom
})
}
}
// if (this.$store.getters.getAutoJoin) {
// // Attempt to auto join