fix: throwing error when settings key being empty - fixed #1409
This commit is contained in:
@@ -50,7 +50,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncCollections() {
|
syncCollections() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[0]) {
|
||||||
if (fb.currentSettings[0].value) {
|
if (fb.currentSettings[0].value) {
|
||||||
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncCollections() {
|
syncCollections() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[0]) {
|
||||||
if (fb.currentSettings[0].value) {
|
if (fb.currentSettings[0].value) {
|
||||||
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncCollections() {
|
syncCollections() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[0]) {
|
||||||
if (fb.currentSettings[0].value) {
|
if (fb.currentSettings[0].value) {
|
||||||
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncCollections() {
|
syncCollections() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[0]) {
|
||||||
if (fb.currentSettings[0].value) {
|
if (fb.currentSettings[0].value) {
|
||||||
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncCollections() {
|
syncCollections() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[0]) {
|
||||||
if (fb.currentSettings[0].value) {
|
if (fb.currentSettings[0].value) {
|
||||||
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,14 @@
|
|||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul v-if="folder.folders && folder.folders.length === 0 && folder.requests && folder.requests.length === 0">
|
<ul
|
||||||
|
v-if="
|
||||||
|
folder.folders &&
|
||||||
|
folder.folders.length === 0 &&
|
||||||
|
folder.requests &&
|
||||||
|
folder.requests.length === 0
|
||||||
|
"
|
||||||
|
>
|
||||||
<li class="flex ml-8 border-l border-brdColor">
|
<li class="flex ml-8 border-l border-brdColor">
|
||||||
<p class="info"><i class="material-icons">not_interested</i> {{ $t("folder_empty") }}</p>
|
<p class="info"><i class="material-icons">not_interested</i> {{ $t("folder_empty") }}</p>
|
||||||
</li>
|
</li>
|
||||||
@@ -124,7 +131,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncCollections() {
|
syncCollections() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[0]) {
|
||||||
if (fb.currentSettings[0].value) {
|
if (fb.currentSettings[0].value) {
|
||||||
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ export default {
|
|||||||
this.fileImported()
|
this.fileImported()
|
||||||
},
|
},
|
||||||
syncToFBCollections() {
|
syncToFBCollections() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[0]) {
|
||||||
if (fb.currentSettings[0].value) {
|
if (fb.currentSettings[0].value) {
|
||||||
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ export default {
|
|||||||
this.$data.editingRequestIndex = undefined
|
this.$data.editingRequestIndex = undefined
|
||||||
},
|
},
|
||||||
syncCollections() {
|
syncCollections() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[0]) {
|
||||||
if (fb.currentSettings[0].value) {
|
if (fb.currentSettings[0].value) {
|
||||||
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncCollections() {
|
syncCollections() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[0]) {
|
||||||
if (fb.currentSettings[0].value) {
|
if (fb.currentSettings[0].value) {
|
||||||
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncCollections() {
|
syncCollections() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[0]) {
|
||||||
if (fb.currentSettings[0].value) {
|
if (fb.currentSettings[0].value) {
|
||||||
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncEnvironments() {
|
syncEnvironments() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[1]) {
|
||||||
if (fb.currentSettings[1].value) {
|
if (fb.currentSettings[1].value) {
|
||||||
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncEnvironments() {
|
syncEnvironments() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[1]) {
|
||||||
if (fb.currentSettings[1].value) {
|
if (fb.currentSettings[1].value) {
|
||||||
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
syncEnvironments() {
|
syncEnvironments() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[1]) {
|
||||||
if (fb.currentSettings[1].value) {
|
if (fb.currentSettings[1].value) {
|
||||||
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ export default {
|
|||||||
this.fileImported()
|
this.fileImported()
|
||||||
},
|
},
|
||||||
syncToFBEnvironments() {
|
syncToFBEnvironments() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[1]) {
|
||||||
if (fb.currentSettings[1].value) {
|
if (fb.currentSettings[1].value) {
|
||||||
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ export default {
|
|||||||
this.$data.editingEnvironmentIndex = undefined
|
this.$data.editingEnvironmentIndex = undefined
|
||||||
},
|
},
|
||||||
syncEnvironments() {
|
syncEnvironments() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[1]) {
|
||||||
if (fb.currentSettings[1].value) {
|
if (fb.currentSettings[1].value) {
|
||||||
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1475,7 +1475,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.$refs.historyComponent.addEntry(entry)
|
this.$refs.historyComponent.addEntry(entry)
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[2]) {
|
||||||
if (fb.currentSettings[2].value) {
|
if (fb.currentSettings[2].value) {
|
||||||
fb.writeHistory(entry)
|
fb.writeHistory(entry)
|
||||||
}
|
}
|
||||||
@@ -1532,7 +1532,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.$refs.historyComponent.addEntry(entry)
|
this.$refs.historyComponent.addEntry(entry)
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[2]) {
|
||||||
if (fb.currentSettings[2].value) {
|
if (fb.currentSettings[2].value) {
|
||||||
fb.writeHistory(entry)
|
fb.writeHistory(entry)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -265,14 +265,14 @@ export default {
|
|||||||
setTimeout(() => (target.innerHTML = '<i class="material-icons">clear_all</i>'), 1000)
|
setTimeout(() => (target.innerHTML = '<i class="material-icons">clear_all</i>'), 1000)
|
||||||
},
|
},
|
||||||
syncCollections() {
|
syncCollections() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[0]) {
|
||||||
if (fb.currentSettings[0].value) {
|
if (fb.currentSettings[0].value) {
|
||||||
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
fb.writeCollections(JSON.parse(JSON.stringify(this.$store.state.postwoman.collections)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
syncEnvironments() {
|
syncEnvironments() {
|
||||||
if (fb.currentUser !== null) {
|
if (fb.currentUser !== null && fb.currentSettings[1]) {
|
||||||
if (fb.currentSettings[1].value) {
|
if (fb.currentSettings[1].value) {
|
||||||
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
fb.writeEnvironments(JSON.parse(JSON.stringify(this.$store.state.postwoman.environments)))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user