File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
apps/sim/stores/workflows/workflow Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -317,11 +317,12 @@ export const useWorkflowStore = create<WorkflowStore>()(
317317 }
318318
319319 if ( blocks . length === 1 ) {
320+ const workflowId = get ( ) . currentWorkflowId ?? 'unknown'
320321 import ( '@/lib/posthog/client' )
321322 . then ( ( { captureClientEvent } ) => {
322323 captureClientEvent ( 'block_added' , {
323324 block_type : blocks [ 0 ] . type ,
324- workflow_id : get ( ) . currentWorkflowId ?? 'unknown' ,
325+ workflow_id : workflowId ,
325326 } )
326327 } )
327328 . catch ( ( ) => { } )
@@ -389,11 +390,12 @@ export const useWorkflowStore = create<WorkflowStore>()(
389390 if ( ids . length === 1 ) {
390391 const blockType = currentBlocks [ ids [ 0 ] ] ?. type
391392 if ( blockType ) {
393+ const workflowId = get ( ) . currentWorkflowId ?? 'unknown'
392394 import ( '@/lib/posthog/client' )
393395 . then ( ( { captureClientEvent } ) => {
394396 captureClientEvent ( 'block_removed' , {
395397 block_type : blockType ,
396- workflow_id : get ( ) . currentWorkflowId ?? 'unknown' ,
398+ workflow_id : workflowId ,
397399 } )
398400 } )
399401 . catch ( ( ) => { } )
You can’t perform that action at this time.
0 commit comments