Fallback to undefined rather than false when resolving CLI flags (#4362)

This commit is contained in:
Joseph Lozano 2022-08-17 03:47:38 -04:00 committed by GitHub
parent 1de82f0f78
commit aa5118e854
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Allow user config to set `markdown.drafts` option

View file

@ -363,7 +363,7 @@ function resolveFlags(flags: Partial<Flags>): CLIFlags {
config: typeof flags.config === 'string' ? flags.config : undefined,
host:
typeof flags.host === 'string' || typeof flags.host === 'boolean' ? flags.host : undefined,
drafts: typeof flags.drafts === 'boolean' ? flags.drafts : false,
drafts: typeof flags.drafts === 'boolean' ? flags.drafts : undefined,
};
}