mirror of
https://github.com/quartz-community/folder-page.git
synced 2026-07-22 02:50:24 +00:00
fix: guard against undefined getDate in PageList
This commit is contained in:
parent
a4d0b92a1a
commit
c43e090698
5 changed files with 5 additions and 5 deletions
2
dist/components/index.js
vendored
2
dist/components/index.js
vendored
|
|
@ -84,7 +84,7 @@ var PageList = ({
|
|||
const title = page.frontmatter?.title;
|
||||
const tags = page.frontmatter?.tags ?? [];
|
||||
return /* @__PURE__ */ jsx("li", { class: "section-li", children: /* @__PURE__ */ jsxs("div", { class: "section", children: [
|
||||
/* @__PURE__ */ jsx("p", { class: "meta", children: page.dates && /* @__PURE__ */ jsx(
|
||||
/* @__PURE__ */ jsx("p", { class: "meta", children: page.dates && getDate(page) && /* @__PURE__ */ jsx(
|
||||
DateDisplay,
|
||||
{
|
||||
date: getDate(page),
|
||||
|
|
|
|||
2
dist/components/index.js.map
vendored
2
dist/components/index.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js
vendored
2
dist/index.js
vendored
|
|
@ -84,7 +84,7 @@ var PageList = ({
|
|||
const title = page.frontmatter?.title;
|
||||
const tags = page.frontmatter?.tags ?? [];
|
||||
return /* @__PURE__ */ jsx("li", { class: "section-li", children: /* @__PURE__ */ jsxs("div", { class: "section", children: [
|
||||
/* @__PURE__ */ jsx("p", { class: "meta", children: page.dates && /* @__PURE__ */ jsx(
|
||||
/* @__PURE__ */ jsx("p", { class: "meta", children: page.dates && getDate(page) && /* @__PURE__ */ jsx(
|
||||
DateDisplay,
|
||||
{
|
||||
date: getDate(page),
|
||||
|
|
|
|||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -89,7 +89,7 @@ export const PageList: QuartzComponent = ({
|
|||
<li class="section-li">
|
||||
<div class="section">
|
||||
<p class="meta">
|
||||
{page.dates && (
|
||||
{page.dates && getDate(page) && (
|
||||
<DateDisplay
|
||||
date={getDate(page)!}
|
||||
locale={(cfg as { locale?: string } | undefined)?.locale ?? "en-US"}
|
||||
|
|
|
|||
Loading…
Reference in a new issue