Fixes 404 error when loading attachments if the document is a text or URL.
This commit is contained in:
parent
3779fe8f19
commit
51d605b1b3
|
@ -221,7 +221,7 @@ export const fetchAttachments = ({ commit }, { page, attachmentsPerPage, itemId,
|
||||||
|
|
||||||
let endpoint = '/items/' + itemId + '/attachments?perpage=' + attachmentsPerPage + '&paged=' + page;
|
let endpoint = '/items/' + itemId + '/attachments?perpage=' + attachmentsPerPage + '&paged=' + page;
|
||||||
|
|
||||||
if (documentId)
|
if (documentId && !isNaN(documentId))
|
||||||
endpoint += '&exclude=' + documentId;
|
endpoint += '&exclude=' + documentId;
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
Loading…
Reference in New Issue