From b00125973e81e1fa9b7ebbc8c8cb4b7c629eb029 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 17 Dec 2024 12:42:05 +0200 Subject: [PATCH] fixes --- .../src/resources/helpers/frontmatter.ts | 6 ++++-- www/utils/packages/types/lib/index.d.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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 = {