Merge pull request #410 from adevr/bug/save-request

Fixing bug on request saving
This commit is contained in:
Liyas Thomas
2019-12-11 09:07:36 +05:30
committed by GitHub
3 changed files with 67 additions and 48 deletions

View File

@@ -121,7 +121,11 @@ export default {
const userSelectedAnyCollection =
this.$data.requestData.collectionIndex !== undefined;
if (!userSelectedAnyCollection) return [];
const noCollectionAvailable =
this.$store.state.postwoman.collections[this.$data.requestData.collectionIndex] !== undefined;
if (!noCollectionAvailable) return [];
return this.$store.state.postwoman.collections[
this.$data.requestData.collectionIndex
].folders;
@@ -144,6 +148,10 @@ export default {
const collection = this.$store.state.postwoman.collections[
this.$data.requestData.collectionIndex
];
const noCollectionAvailable =
this.$store.state.postwoman.collections[this.$data.requestData.collectionIndex] !== undefined;
if (!noCollectionAvailable) return [];
const requests = collection.requests;
return requests;
}