From bae56b8b9dec8c5ac8f6b6df5daa530c30fcca72 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Fri, 22 Mar 2024 14:27:45 +1300 Subject: [PATCH] Fix crash when match is undefined --- shared/naturalcrit/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index 939c2cc81..a99c1e543 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -337,7 +337,7 @@ const definitionListsMultiline = { const definitions = []; while (match = regex.exec(src)) { if(match[1]) { - if(this.lexer.blockTokens(match[1].trim())[0].type !== 'paragraph') // DT must not be another block-level token besides

+ if(this.lexer.blockTokens(match[1].trim())[0]?.type !== 'paragraph') // DT must not be another block-level token besides

break; definitions.push({ dt : this.lexer.inlineTokens(match[1].trim()),