fix: diffs double rendering when CSR'd
This commit is contained in:
parent
5953378a12
commit
4dd9f33eba
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ export function Diff<T>(props: DiffProps<T>) {
|
||||||
})
|
})
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (isServer) return
|
if (isServer || !props.preloadedDiff) return
|
||||||
fileDiffInstance = new FileDiff<T>({
|
fileDiffInstance = new FileDiff<T>({
|
||||||
...createDefaultOptions(props.diffStyle),
|
...createDefaultOptions(props.diffStyle),
|
||||||
...others,
|
...others,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue