Browse Source

fix: diffs double rendering when CSR'd

Adam 2 months ago
parent
commit
4dd9f33eba
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/ui/src/components/diff.tsx

+ 1 - 1
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,