Skip to content

Commit 2735156

Browse files
committed
Fixing 'new deal in stage' initial event emission
1 parent 5914a1b commit 2735156

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

components/hubspot/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/hubspot",
3-
"version": "1.7.9",
3+
"version": "1.7.10",
44
"description": "Pipedream Hubspot Components",
55
"main": "hubspot.app.mjs",
66
"keywords": [

components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default {
1111
key: "hubspot-new-deal-in-stage",
1212
name: "New Deal In Stage",
1313
description: "Emit new event for each new deal in a stage.",
14-
version: "0.0.40",
14+
version: "0.0.41",
1515
dedupe: "unique",
1616
type: "source",
1717
props: {
@@ -100,7 +100,7 @@ export default {
100100

101101
for (const deal of results.results) {
102102
const ts = await this.getTs(deal);
103-
if (this.isRelevant(ts, after)) {
103+
if (!after || this.isRelevant(ts, after)) {
104104
if (deal.properties.hubspot_owner_id) {
105105
deal.properties.owner = await this.getOwner(
106106
deal.properties.hubspot_owner_id,
@@ -113,6 +113,11 @@ export default {
113113
}
114114
}
115115
}
116+
117+
// first run, get only first page
118+
if (!after) {
119+
return;
120+
}
116121
} while (params.after);
117122
},
118123
async processResults(after) {

0 commit comments

Comments
 (0)