mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
fix(frontend): fix revision-viewer type
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
982783c8cf
commit
386d5700cf
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ export const RevisionViewer: React.FC<RevisionViewerProps> = ({ selectedRevision
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
const inversePatch = invertUnifiedPatch(patches[0])
|
const inversePatch = invertUnifiedPatch(patches[0])
|
||||||
return applyPatch(revision.content, inversePatch)
|
return applyPatch(revision.content, inversePatch) || ''
|
||||||
}, [revision])
|
}, [revision])
|
||||||
|
|
||||||
if (selectedRevisionId === undefined) {
|
if (selectedRevisionId === undefined) {
|
||||||
|
@ -58,7 +58,7 @@ export const RevisionViewer: React.FC<RevisionViewerProps> = ({ selectedRevision
|
||||||
return (
|
return (
|
||||||
<AsyncLoadingBoundary loading={loading || !revision} componentName={'RevisionViewer'} error={error}>
|
<AsyncLoadingBoundary loading={loading || !revision} componentName={'RevisionViewer'} error={error}>
|
||||||
<ReactDiffViewer
|
<ReactDiffViewer
|
||||||
oldValue={previousRevisionContent ?? ''}
|
oldValue={previousRevisionContent}
|
||||||
newValue={revision?.content ?? ''}
|
newValue={revision?.content ?? ''}
|
||||||
splitView={false}
|
splitView={false}
|
||||||
compareMethod={DiffMethod.WORDS}
|
compareMethod={DiffMethod.WORDS}
|
||||||
|
|
Loading…
Reference in a new issue