From 5e9cdccbb88f4a951d64149784d6a015be03b38d Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Tue, 4 May 2021 01:17:55 +0200 Subject: [PATCH] check if there's anything in a list.. --- app/c.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/c.js b/app/c.js index bdefebc..2bce8a7 100644 --- a/app/c.js +++ b/app/c.js @@ -11,7 +11,9 @@ function captureFrontMatterAndMarkdown() { } else if (k.endsWith('[]')) { formData.set(k, formData.getAll(k)) var s = JSON.stringify(formData.getAll(k)[0].split(",")) - frontmatter += `${k.slice(0, -2)}: ${s}\n` + if (s != "") { + frontmatter += `${k.slice(0, -2)}: ${s}\n` + } } else if (k == "relpath") { filepath = `${location.pathname.split('/public')[0]}/content/${formData.get(k)}` gitpath = `${location.pathname.split('/public')[0]}`