diff --git a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/frontmatter.ts b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/frontmatter.ts index e1d5f289f9c26..ac80604a4e900 100644 --- a/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/frontmatter.ts +++ b/www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/frontmatter.ts @@ -38,10 +38,12 @@ function resolveFrontmatterVariables( frontmatterData: FrontmatterData, reflection: Reflection ): FrontmatterData { - const tempFrontmatterData = Object.assign({}, frontmatterData) + const tempFrontmatterData: FrontmatterData = JSON.parse( + JSON.stringify(frontmatterData) + ) Object.keys(tempFrontmatterData).forEach((key) => { const value = tempFrontmatterData[key] - if (!value) { + if (!value || typeof value !== "string") { return } diff --git a/www/utils/packages/types/lib/index.d.ts b/www/utils/packages/types/lib/index.d.ts index 9b2cc6ad2c553..9736fb648ea58 100644 --- a/www/utils/packages/types/lib/index.d.ts +++ b/www/utils/packages/types/lib/index.d.ts @@ -55,7 +55,7 @@ export type FrontmatterData = { sidebar_label?: string displayed_sidebar?: string tags?: string[] - [k: string]: string + [k: string]: unknown } export type FormattingOptionType = {