fix: throwing error when settings key being empty - fixed #1409
This commit is contained in:
@@ -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)))
|
||||
}
|
||||
|
||||
@@ -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)))
|
||||
}
|
||||
|
||||
@@ -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)))
|
||||
}
|
||||
|
||||
@@ -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)))
|
||||
}
|
||||
|
||||
@@ -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)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user