Skip to content

Commit 9fbd64d

Browse files
committed
Fix react hook bug
1 parent 599cb7b commit 9fbd64d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/diff-controls.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ export const DiffControls = memo(function DiffControls() {
4444
useCallback((state) => ({ activeWorkflowId: state.activeWorkflowId }), [])
4545
)
4646

47-
// Don't show anything if no diff is available or diff is not ready
48-
if (!diffWorkflow || !isDiffReady) {
49-
return null
50-
}
51-
5247
const handleToggleDiff = useCallback(() => {
5348
logger.info('Toggling diff view', { currentState: isShowingDiff })
5449
toggleDiffView()
@@ -302,6 +297,11 @@ export const DiffControls = memo(function DiffControls() {
302297
})
303298
}, [clearPreviewYaml, updatePreviewToolCallState, rejectChanges])
304299

300+
// Don't show anything if no diff is available or diff is not ready
301+
if (!diffWorkflow || !isDiffReady) {
302+
return null
303+
}
304+
305305
return (
306306
<div className='-translate-x-1/2 fixed bottom-20 left-1/2 z-30'>
307307
<div className='flex items-center gap-2'>

0 commit comments

Comments
 (0)