Skip to content

Commit 45cbd18

Browse files
waleedlatif1claude
andcommitted
fix(hubspot): use resolveSelectedObjectType in pipelineId/stageId fetchOptions
Both selectors used inline `?? 'contact'` fallbacks while properties and targetPropertyName already routed through the resolver. Switch to the shared helper so custom-object handling stays consistent across every cascading selector. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent f32b53b commit 45cbd18

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

apps/sim/triggers/hubspot/poller.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,7 @@ export const hubspotPollingTrigger: TriggerConfig = {
200200
const credentialId = useSubBlockStore.getState().getValue(blockId, 'triggerCredentials') as
201201
| string
202202
| null
203-
const objectType =
204-
(useSubBlockStore.getState().getValue(blockId, 'objectType') as string | null) ??
205-
'contact'
203+
const objectType = resolveSelectedObjectType(blockId) ?? 'contact'
206204
if (!credentialId) throw new Error('No HubSpot credential selected')
207205
if (isCredentialSetValue(credentialId)) return []
208206
try {
@@ -231,9 +229,7 @@ export const hubspotPollingTrigger: TriggerConfig = {
231229
const credentialId = useSubBlockStore.getState().getValue(blockId, 'triggerCredentials') as
232230
| string
233231
| null
234-
const objectType =
235-
(useSubBlockStore.getState().getValue(blockId, 'objectType') as string | null) ??
236-
'contact'
232+
const objectType = resolveSelectedObjectType(blockId) ?? 'contact'
237233
const pipelineId = useSubBlockStore.getState().getValue(blockId, 'pipelineId') as
238234
| string
239235
| null

0 commit comments

Comments
 (0)