From 0b6e02ab35edc9ba0d9fe24f905efb01bbda97c0 Mon Sep 17 00:00:00 2001 From: Ivan Demidov Date: Mon, 15 Mar 2021 09:45:15 +0300 Subject: [PATCH] fix: inline markdown, close #18 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 60328fa..514361e 100644 --- a/index.js +++ b/index.js @@ -17,7 +17,7 @@ module.exports = function (config = {}) { return function includeMD (tree) { tree.match({ tag: 'markdown' }, function (node) { - let src = node.attrs.src || false + let src = (node.attrs && node.attrs.src) || false let content = '' if (src) {