Fixing bug on request saving
This bug appeared when saving a request with no collections available
This commit is contained in:
@@ -128,7 +128,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;
|
||||
@@ -151,6 +155,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user