Skip to content

Commit 276ce66

Browse files
committed
ack comments
1 parent 08bad4d commit 276ce66

File tree

1 file changed

+4
-2
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]

1 file changed

+4
-2
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)