fix: throwing error when settings key being empty - fixed #1409

This commit is contained in:
Liyas Thomas
2021-01-04 06:25:02 +05:30
parent eae071f9b8
commit 82de03101b
17 changed files with 27 additions and 20 deletions

View File

@@ -50,7 +50,7 @@ export default {
},
methods: {
syncEnvironments() {
if (fb.currentUser !== null) {
if (fb.currentUser !== null && fb.currentSettings[1]) {
if (fb.currentSettings[1].value) {
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
}

View File

@@ -135,7 +135,7 @@ export default {
},
methods: {
syncEnvironments() {
if (fb.currentUser !== null) {
if (fb.currentUser !== null && fb.currentSettings[1]) {
if (fb.currentSettings[1].value) {
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
}

View File

@@ -51,7 +51,7 @@ export default {
},
methods: {
syncEnvironments() {
if (fb.currentUser !== null) {
if (fb.currentUser !== null && fb.currentSettings[1]) {
if (fb.currentSettings[1].value) {
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
}

View File

@@ -256,7 +256,7 @@ export default {
this.fileImported()
},
syncToFBEnvironments() {
if (fb.currentUser !== null) {
if (fb.currentUser !== null && fb.currentSettings[1]) {
if (fb.currentSettings[1].value) {
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
}

View File

@@ -153,7 +153,7 @@ export default {
this.$data.editingEnvironmentIndex = undefined
},
syncEnvironments() {
if (fb.currentUser !== null) {
if (fb.currentUser !== null && fb.currentSettings[1]) {
if (fb.currentSettings[1].value) {
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
}