diff --git a/src/components/ContentRenderer.jsx b/src/components/ContentRenderer.jsx index 98e112d..6ad10a7 100644 --- a/src/components/ContentRenderer.jsx +++ b/src/components/ContentRenderer.jsx @@ -99,6 +99,13 @@ const renderAnnotation = (textObject = {}, navigate, index) => { return textObject.text; }; const renderText = (text = [], navigate) => { + if (text.length === 0) { + return null; + } + if (typeof text === "string" || typeof text === "number") { + return text; + } + console.log("text", text, text.map); return text.map((item, index) => { return renderAnnotation(item, navigate, index); });