We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca61413 commit e8637b5Copy full SHA for e8637b5
1 file changed
lib/render-content/renderContent.js
@@ -17,6 +17,9 @@ const inlineTagRegex = new RegExp(`\n?(</?${inlineTagString}>?)\n?`, 'gm')
17
18
// parse multiple times because some templates contain more templates. :]
19
async function renderContent(template = '', context = {}, options = {}) {
20
+ // If called with a falsy template, it can't ever become something
21
+ // when rendered. We can exit early to save some pointless work.
22
+ if (!template) return template
23
try {
24
// remove any newlines that precede html comments, then remove the comments
25
if (template) {
0 commit comments