fix: don't try to map non-array data
This commit is contained in:
parent
1005182a50
commit
813d2b56a0
@ -328,7 +328,7 @@ export default abstract class AbstractService<Model extends IAbstract = IAbstrac
|
|||||||
this.resultCount = Number(response.headers['x-pagination-result-count'])
|
this.resultCount = Number(response.headers['x-pagination-result-count'])
|
||||||
this.totalPages = Number(response.headers['x-pagination-total-pages'])
|
this.totalPages = Number(response.headers['x-pagination-total-pages'])
|
||||||
|
|
||||||
if (response.data === null || (Array.isArray(response.data) && response.data.length === 0)) {
|
if (!Array.isArray(response.data)) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user