Skip to content

Commit 657c7bf

Browse files
Add pairedItem to all output items for proper item linking
1 parent 35e5d53 commit 657c7bf

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

nodes/Bronto/Bronto.node.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,18 +272,18 @@ export class Bronto implements INodeType {
272272

273273
if (events.length > 0) {
274274
for (const event of events) {
275-
returnData.push({ json: event });
275+
returnData.push({ json: event, pairedItem: { item: i } });
276276
}
277277
} else if (groupsResult.length > 0) {
278278
for (const group of groupsResult) {
279-
returnData.push({ json: group });
279+
returnData.push({ json: group, pairedItem: { item: i } });
280280
}
281281
} else if (result.length > 0) {
282282
for (const item of result) {
283-
returnData.push({ json: item });
283+
returnData.push({ json: item, pairedItem: { item: i } });
284284
}
285285
} else {
286-
returnData.push({ json: response as IDataObject });
286+
returnData.push({ json: response as IDataObject, pairedItem: { item: i } });
287287
}
288288

289289
const nextPageUrl = response?.pagination?.next_page_url as string | undefined;
@@ -296,7 +296,7 @@ export class Bronto implements INodeType {
296296
} while (true);
297297
} catch (error) {
298298
if (this.continueOnFail()) {
299-
returnData.push({ json: { error: (error as Error).message } });
299+
returnData.push({ json: { error: (error as Error).message }, pairedItem: { item: i } });
300300
continue;
301301
}
302302
throw new NodeApiError(this.getNode(), error as JsonObject);

0 commit comments

Comments
 (0)