Skip to content

Commit

Permalink
fix getJugglLinks#allFields
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Jul 5, 2021
1 parent c0ddc5c commit 64be567
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sharedFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export async function getJugglLinks(
console.log({ typedLinksArr })
}

const allFields: string[] = [settings.parentFieldName, settings.siblingFieldName, settings.childFieldName].flat().filter(field => field !== "")
const allFields: string[] = [settings.parentFieldName, settings.siblingFieldName, settings.childFieldName].map(splitAndTrim).flat().filter(field => field !== "")

typedLinksArr.forEach(jugglLink => {
if (jugglLink.links.length) {
Expand All @@ -122,7 +122,7 @@ export function getFields(
field: string,
settings: BreadcrumbsSettings
): string[] {
const fieldItems: string | [] = fileFrontmatter.frontmatter[field] ?? [];
const fieldItems: string | [] = fileFrontmatter.frontmatter?.[field] ?? [];


if (typeof fieldItems === "string") {
Expand Down

0 comments on commit 64be567

Please sign in to comment.