diff --git a/src/language/markdown-source-code.js b/src/language/markdown-source-code.js index 7ff11a8..978fe96 100644 --- a/src/language/markdown-source-code.js +++ b/src/language/markdown-source-code.js @@ -159,7 +159,7 @@ export class MarkdownSourceCode extends TextSourceCodeBase { * Collection of inline configuration comments. * @type {Array} */ - #inlineConfigComments = []; + #inlineConfigComments; /** * The AST of the source code. @@ -196,7 +196,7 @@ export class MarkdownSourceCode extends TextSourceCodeBase { * @returns {Array} An array of all inline configuration nodes. */ getInlineConfigNodes() { - if (this.#inlineConfigComments.length === 0) { + if (!this.#inlineConfigComments) { this.#inlineConfigComments = this.#htmlNodes.flatMap( extractInlineConfigCommentsFromHTML, );