Fix for no Files present in tenant
This commit is contained in:
@@ -36,6 +36,9 @@ export const useFiles = () => {
|
||||
let data = []
|
||||
data = await useEntities("files").select("*, incominginvoice(*), project(*), vendor(*), customer(*), contract(*), plant(*), createddocument(*), vehicle(*), product(*), profile(*), check(*), inventoryitem(*)")
|
||||
|
||||
if (!Array.isArray(data) || data.length === 0) {
|
||||
return []
|
||||
}
|
||||
|
||||
|
||||
const res = await useNuxtApp().$api("/api/files/presigned",{
|
||||
@@ -138,4 +141,4 @@ export const useFiles = () => {
|
||||
|
||||
|
||||
return {uploadFiles, selectDocuments, selectSomeDocuments, selectDocument, downloadFile, dataURLtoFile}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user