mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(Microsoft OneDrive Trigger Node): Fix issue with test run failing (#9386)
This commit is contained in:
@@ -123,9 +123,11 @@ export class MicrosoftOneDriveTrigger implements INodeType {
|
||||
}) as string
|
||||
).replace('%21', '!');
|
||||
const folderPath = await getPath.call(this, folderId);
|
||||
responseData = responseData.filter((item: IDataObject) =>
|
||||
((item.parentReference as IDataObject).path as string).startsWith(folderPath),
|
||||
);
|
||||
|
||||
responseData = responseData.filter((item: IDataObject) => {
|
||||
const path = (item.parentReference as IDataObject)?.path as string;
|
||||
return typeof path === 'string' && path.startsWith(folderPath);
|
||||
});
|
||||
}
|
||||
responseData = responseData.filter((item: IDataObject) => item[eventResource]);
|
||||
if (!responseData?.length) {
|
||||
@@ -146,11 +148,7 @@ export class MicrosoftOneDriveTrigger implements INodeType {
|
||||
}));
|
||||
}
|
||||
|
||||
if (this.getMode() === 'manual') {
|
||||
return [this.helpers.returnJsonArray(responseData[0])];
|
||||
} else {
|
||||
return [this.helpers.returnJsonArray(responseData)];
|
||||
}
|
||||
return [this.helpers.returnJsonArray(responseData)];
|
||||
} catch (error) {
|
||||
if (this.getMode() === 'manual' || !workflowData.lastTimeChecked) {
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user