🐛 Fix issue with empty folders on Nextcloud node #2057

This commit is contained in:
Jan Oberhauser 2021-08-08 11:47:23 +02:00
parent fc6d3ad8c0
commit 72d57537de

View file

@ -1103,6 +1103,8 @@ export class NextCloud implements INodeType {
(jsonResponseData['d:multistatus'] as IDataObject)['d:response'] !== null) {
let skippedFirst = false;
// @ts-ignore
if (Array.isArray(jsonResponseData['d:multistatus']['d:response'])) {
// @ts-ignore
for (const item of jsonResponseData['d:multistatus']['d:response']) {
if (skippedFirst === false) {
@ -1132,6 +1134,8 @@ export class NextCloud implements INodeType {
returnData.push(newItem as IDataObject);
}
}
}
} else {
returnData.push(responseData as IDataObject);
}