diff --git a/content/mdnotes.js b/content/mdnotes.js index 87b3216..747c547 100644 --- a/content/mdnotes.js +++ b/content/mdnotes.js @@ -555,6 +555,9 @@ function get_placeholder_contents(template, fields) { const re = /{{(\w+)}}/g; let placeholders = template.match(re); + // In case a template doesn't have any placeholders + if (!placeholders) return; + // Loop through all the placeholders for (const result of placeholders) { let placeholder = result.substring(2, result.length - 2)