File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
apps/sim/stores/workflows/workflow Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -390,15 +390,18 @@ export const useWorkflowStore = create<WorkflowStore>()(
390390 parallels : generateParallelBlocks ( newBlocks ) ,
391391 } )
392392
393- if ( removedBlockTypes . length === 1 ) {
394- import ( '@/lib/posthog/client' )
395- . then ( ( { captureClientEvent } ) => {
396- captureClientEvent ( 'block_removed' , {
397- block_type : removedBlockTypes [ 0 ] ,
398- workflow_id : get ( ) . currentWorkflowId ?? 'unknown' ,
393+ if ( ids . length === 1 ) {
394+ const blockType = currentBlocks [ ids [ 0 ] ] ?. type
395+ if ( blockType ) {
396+ import ( '@/lib/posthog/client' )
397+ . then ( ( { captureClientEvent } ) => {
398+ captureClientEvent ( 'block_removed' , {
399+ block_type : blockType ,
400+ workflow_id : get ( ) . currentWorkflowId ?? 'unknown' ,
401+ } )
399402 } )
400- } )
401- . catch ( ( ) => { } )
403+ . catch ( ( ) => { } )
404+ }
402405 }
403406
404407 get ( ) . updateLastSaved ( )
You can’t perform that action at this time.
0 commit comments