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,12 +197,14 @@ export default {
return this.$router.push('/signin') return this.$router.push('/signin')
} }
console.log('Settings', settings) console.log('Settings', settings)
if (settings.autoJoin) { if (settings.autoJoin === true || settings.autoJoin === 'true') {
await this.$store.dispatch('autoJoin', { if (settings.autoJoinServer) {
server: settings.autoJoinServer, this.$store.dispatch('autoJoin', {
password: settings.autoJoinPassword, server: settings.autoJoinServer,
room: settings.autoJoinRoom password: settings.autoJoinPassword,
}) room: settings.autoJoinRoom
})
}
} }
// if (this.$store.getters.getAutoJoin) { // if (this.$store.getters.getAutoJoin) {