File tree Expand file tree Collapse file tree
packages/ui/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,8 +128,12 @@ function DiffSSRViewer<T>(props: SSRDiffFileProps<T>) {
128128 prerenderedHTML : local . preloadedDiff . prerenderedHTML ,
129129 }
130130 : {
131- oldFile : local . before ,
132- newFile : local . after ,
131+ oldFile : local . before
132+ ? { ...local . before , contents : typeof local . before . contents === "string" ? local . before . contents : "" }
133+ : local . before ,
134+ newFile : local . after
135+ ? { ...local . after , contents : typeof local . after . contents === "string" ? local . after . contents : "" }
136+ : local . after ,
133137 lineAnnotations : annotations ,
134138 fileContainer : fileDiffRef ,
135139 containerWrapper : container ,
Original file line number Diff line number Diff line change @@ -1906,11 +1906,11 @@ ToolRegistry.register({
19061906 mode = "diff"
19071907 before = { {
19081908 name : props . metadata ?. filediff ?. file || props . input . filePath ,
1909- contents : props . metadata ?. filediff ?. before || props . input . oldString ,
1909+ contents : props . metadata ?. filediff ?. before || props . input . oldString || "" ,
19101910 } }
19111911 after = { {
19121912 name : props . metadata ?. filediff ?. file || props . input . filePath ,
1913- contents : props . metadata ?. filediff ?. after || props . input . newString ,
1913+ contents : props . metadata ?. filediff ?. after || props . input . newString || "" ,
19141914 } }
19151915 />
19161916 </ div >
You can’t perform that action at this time.
0 commit comments