Jacky Zhao
2023-09-07 2525bfbab5553f970997ea3c60af180cbef1fdd2
quartz/components/scripts/graph.inline.ts
@@ -47,11 +47,12 @@
  const data = await fetchData
  const links: LinkData[] = []
  const validLinks = new Set(Object.keys(data).map((slug) => simplifySlug(slug as FullSlug)))
  for (const [src, details] of Object.entries<ContentDetails>(data)) {
    const source = simplifySlug(src as FullSlug)
    const outgoing = details.links ?? []
    for (const dest of outgoing) {
      if (dest in data) {
      if (validLinks.has(dest)) {
        links.push({ source, target: dest })
      }
    }