From 1f34c9019bc1bac2e37097df97a3bd600029a76a Mon Sep 17 00:00:00 2001 From: Marcell Mars Date: Thu, 15 Apr 2021 01:10:20 +0200 Subject: [PATCH] hastiers in one line was too optimistic because the crust doesn't have has_ line --- src/App.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/App.svelte b/src/App.svelte index 163a092..876f81b 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -186,7 +186,10 @@ v = v.substring(1) } path = repo.path; - couldhave = METASP[Object.keys(repo.frontmatter).filter(t => t.startsWith("has_"))[0].split("has_")[1]].tiers + let hastiers = Object.keys(repo.frontmatter).filter(t => t.startsWith("has_")) + if (hastiers.length == 1) { + couldhave = METASP[hastiers[0].split("has_")[1]].tiers + } console.log(JSON.stringify(repo)) generateFrontMatter(repo.frontmatter, path, repo.relpermalink, document.location.protocol.substring(0,4)) }