Commit 06c84a9c authored by HJ's avatar HJ 🐼

fix MFA crashing on user-settings page

parent 1db3c785
......@@ -7,6 +7,7 @@ import { mapState } from 'vuex'
const Mfa = {
data: () => ({
settings: { // current settings of MFA
available: false,
enabled: false,
totp: false
},
......@@ -139,7 +140,9 @@ const Mfa = {
// fetch settings from server
async fetchSettings () {
let result = await this.backendInteractor.fetchSettingsMFA()
if (result.error) return
this.settings = result.settings
this.settings.available = true
return result
}
},
......
<template>
<div class="setting-item mfa-settings" v-if="readyInit">
<div class="setting-item mfa-settings" v-if="readyInit && settings.available">
<div class="mfa-heading">
<h2>{{$t('settings.mfa.title')}}</h2>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment