diff --git a/htmlToElement.js b/htmlToElement.js index fc9151d..5bcca40 100644 --- a/htmlToElement.js +++ b/htmlToElement.js @@ -128,7 +128,9 @@ export default function htmlToElement(rawHtml, customOpts = {}, done) { const defaultStyle = opts.textComponentProps ? opts.textComponentProps.style : null; const customStyle = inheritedStyle(parent); - if (parent.name === 'ol') { + if(!parent){ + listItemPrefix = null; + } else if (parent.name === 'ol') { listItemPrefix = ( {`${orderedListCounter++}. `} );