From 21e75acc8d292c98a201e539d6f8ce4bd2941077 Mon Sep 17 00:00:00 2001 From: Seohyun Kim <153896425+1etterh@users.noreply.github.com> Date: Mon, 1 Jul 2024 12:59:08 +0900 Subject: [PATCH] fix: "draft" true or false in frontmatter still removes from publishing #1244 (#1249) * fix: draft bug #1244 * update: contents in folder before creating PR * Update draft.ts --- quartz/plugins/filters/draft.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz/plugins/filters/draft.ts b/quartz/plugins/filters/draft.ts index 65e2d6b..5fd06b9 100644 --- a/quartz/plugins/filters/draft.ts +++ b/quartz/plugins/filters/draft.ts @@ -3,7 +3,7 @@ import { QuartzFilterPlugin } from "../types" export const RemoveDrafts: QuartzFilterPlugin<{}> = () => ({ name: "RemoveDrafts", shouldPublish(_ctx, [_tree, vfile]) { - const draftFlag: boolean = vfile.data?.frontmatter?.draft ?? false + const draftFlag: boolean = vfile.data?.frontmatter?.draft || false return !draftFlag }, })