From 4dd9f33ebaa887f906387a2fb8700beff170648f Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Fri, 28 Nov 2025 20:08:50 -0600
Subject: fix: diffs double rendering when CSR'd

---
 packages/ui/src/components/diff.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/ui/src/components/diff.tsx')

diff --git a/packages/ui/src/components/diff.tsx b/packages/ui/src/components/diff.tsx
index c895a6e29..bd2134515 100644
--- a/packages/ui/src/components/diff.tsx
+++ b/packages/ui/src/components/diff.tsx
@@ -46,7 +46,7 @@ export function Diff<T>(props: DiffProps<T>) {
   })
 
   onMount(() => {
-    if (isServer) return
+    if (isServer || !props.preloadedDiff) return
     fileDiffInstance = new FileDiff<T>({
       ...createDefaultOptions(props.diffStyle),
       ...others,
-- 
cgit v1.2.3

