mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -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 ''
|
||||
}
|
||||
const inversePatch = invertUnifiedPatch(patches[0])
|
||||
return applyPatch(revision.content, inversePatch)
|
||||
return applyPatch(revision.content, inversePatch) || ''
|
||||
}, [revision])
|
||||
|
||||
if (selectedRevisionId === undefined) {
|
||||
|
@ -58,7 +58,7 @@ export const RevisionViewer: React.FC<RevisionViewerProps> = ({ selectedRevision
|
|||
return (
|
||||
<AsyncLoadingBoundary loading={loading || !revision} componentName={'RevisionViewer'} error={error}>
|
||||
<ReactDiffViewer
|
||||
oldValue={previousRevisionContent ?? ''}
|
||||
oldValue={previousRevisionContent}
|
||||
newValue={revision?.content ?? ''}
|
||||
splitView={false}
|
||||
compareMethod={DiffMethod.WORDS}
|
||||
|
|
Loading…
Reference in a new issue