diff --git a/src/index.tsx b/src/index.tsx index 95df689..4c35af5 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -193,7 +193,10 @@ class DiffViewer extends React.Component< return diffArray.map((wordDiff, i): JSX.Element => { const content = renderer ? renderer(wordDiff.value as string) - : wordDiff.value; + : (typeof wordDiff.value === 'string' + ? wordDiff.value + // If wordDiff.value is DiffInformation, we don't handle it, unclear why. See c0c99f5712. + : undefined); return wordDiff.type === DiffType.ADDED ? (