diff --git a/frontend/utils/markdown.js b/frontend/utils/markdown.js index b0bc85e0b..281c7c756 100644 --- a/frontend/utils/markdown.js +++ b/frontend/utils/markdown.js @@ -27,7 +27,7 @@ renderer.heading = (text, level) => { const convertToMarkdown = (text) => { // Add TOC - text = toc.insert(text, { + text = toc.insert(text || '', { slugify: (heading) => { // FIXME: E.g. `&` gets messed up const headingSlug = _.escape(slug(heading));