code refactor

This commit is contained in:
MaysWind
2020-11-08 00:53:14 +08:00
parent 7e8b5710c1
commit 69798b88df
6 changed files with 47 additions and 7 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ export default {
self.loading = false;
const data = response.data;
if (!data || !data.success || !data.result || typeof(data.result.enable) !== 'boolean') {
if (!data || !data.success || !data.result || !self.$utils.isBoolean(data.result.enable)) {
self.$alert('Unable to get current two factor authentication status', () => {
router.back();
});