File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,6 @@ async function getOrNull(side: string, path: string) {
8383// A side-by-side diff of source code.
8484export function CodeDiffContainer ( props : { filePair : FilePair ; diffOptions : Partial < DiffOptions > } ) {
8585 const { filePair, diffOptions} = props ;
86- const codediffRef = React . useRef < HTMLDivElement > ( null ) ;
8786 const [ contents , setContents ] = React . useState <
8887 { before : string | null ; after : string | null ; diffOps : DiffRange [ ] } | undefined
8988 > ( ) ;
@@ -119,8 +118,7 @@ export function CodeDiffContainer(props: {filePair: FilePair; diffOptions: Parti
119118
120119 return (
121120 < div >
122- < NoChanges filePair = { filePair } />
123- < div ref = { codediffRef } key = { filePair . idx } >
121+ < div key = { filePair . idx } >
124122 { contents ? (
125123 < FileDiff
126124 filePair = { filePair }
@@ -192,6 +190,7 @@ function FileDiff(props: FileDiffProps) {
192190
193191 return (
194192 < div className = "diff" >
193+ < NoChanges filePair = { filePair } />
195194 < CodeDiff
196195 beforeText = { contentsBefore }
197196 afterText = { contentsAfter }
You can’t perform that action at this time.
0 commit comments