File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
apps/sim/app/workspace/[workspaceId]/w/[workflowId] Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,6 @@ const WorkflowContent = React.memo(() => {
321321
322322 const isAutoConnectEnabled = useAutoConnect ( )
323323 const autoConnectRef = useRef ( isAutoConnectEnabled )
324- // Keep ref in sync with latest value for use in callbacks (no effect needed)
325324 autoConnectRef . current = isAutoConnectEnabled
326325
327326 // Panel open states for context menu
@@ -463,10 +462,13 @@ const WorkflowContent = React.memo(() => {
463462 /** Re-applies diff markers when blocks change after socket rehydration. */
464463 const diffBlocksRef = useRef ( blocks )
465464 useEffect ( ( ) => {
465+ if ( ! isWorkflowReady ) return
466+
466467 const blocksChanged = blocks !== diffBlocksRef . current
468+ if ( ! blocksChanged ) return
469+
467470 diffBlocksRef . current = blocks
468471
469- if ( ! isWorkflowReady || ! blocksChanged ) return
470472 if ( hasActiveDiff && isDiffReady ) {
471473 setTimeout ( ( ) => reapplyDiffMarkers ( ) , 0 )
472474 }
You can’t perform that action at this time.
0 commit comments