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)) }