From 10fdd4b993e260554f928ef7065171758656b169 Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Thu, 30 Nov 2023 19:19:36 -0400 Subject: [PATCH] fix optional parameter type --- tools/monorepo-utils/src/md-docs/lib/generate-frontmatter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/monorepo-utils/src/md-docs/lib/generate-frontmatter.ts b/tools/monorepo-utils/src/md-docs/lib/generate-frontmatter.ts index 0c58aafee79..1b11cee06a5 100644 --- a/tools/monorepo-utils/src/md-docs/lib/generate-frontmatter.ts +++ b/tools/monorepo-utils/src/md-docs/lib/generate-frontmatter.ts @@ -11,7 +11,7 @@ import yaml from 'js-yaml'; */ export const generatePostFrontMatter = ( fileContents: string, - includeContent: false + includeContent?: boolean ): { [ key: string ]: unknown; } => { @@ -40,7 +40,7 @@ export const generatePostFrontMatter = ( const title = headings[ 0 ]?.substring( 2 ).trim(); frontMatter.data.post_title = frontMatter.data.post_title ?? title; - if ( includeContent ) { + if ( includeContent ?? false ) { frontMatter.data.content = frontMatter.content; } return Object.keys( frontMatter.data )