fix: don't try to map data from empty responses
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
771aad5420
commit
a118580704
@ -328,7 +328,7 @@ export default abstract class AbstractService<Model extends IAbstract = IAbstrac
|
||||
this.resultCount = Number(response.headers['x-pagination-result-count'])
|
||||
this.totalPages = Number(response.headers['x-pagination-total-pages'])
|
||||
|
||||
if (response.data === null) {
|
||||
if (response.data === null || (Array.isArray(response.data) && response.data.length === 0)) {
|
||||
return []
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user