fix(Wekan Node): Handle response correctly (#6296)

Fix bug when response wasn't array
This commit is contained in:
agobrech 2023-05-22 18:09:10 +02:00 committed by GitHub
parent 2d90125c87
commit 4d9c8b07a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -654,7 +654,7 @@ export class Wekan implements INodeType {
}
let responseData = await apiRequest.call(this, requestMethod, endpoint, body, qs);
if (returnAll === false) {
if (returnAll === false && Array.isArray(responseData)) {
limit = this.getNodeParameter('limit', i);
responseData = responseData.splice(0, limit);
}