check if there's anything in a list..
This commit is contained in:
parent
758bb2e474
commit
5e9cdccbb8
4
app/c.js
4
app/c.js
|
@ -11,7 +11,9 @@ function captureFrontMatterAndMarkdown() {
|
||||||
} else if (k.endsWith('[]')) {
|
} else if (k.endsWith('[]')) {
|
||||||
formData.set(k, formData.getAll(k))
|
formData.set(k, formData.getAll(k))
|
||||||
var s = JSON.stringify(formData.getAll(k)[0].split(","))
|
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") {
|
} else if (k == "relpath") {
|
||||||
filepath = `${location.pathname.split('/public')[0]}/content/${formData.get(k)}`
|
filepath = `${location.pathname.split('/public')[0]}/content/${formData.get(k)}`
|
||||||
gitpath = `${location.pathname.split('/public')[0]}`
|
gitpath = `${location.pathname.split('/public')[0]}`
|
||||||
|
|
Loading…
Reference in New Issue