From a22e38aaca427f35110ce9877e57cacdfdd44de2 Mon Sep 17 00:00:00 2001 From: Steven Serrata Date: Tue, 10 Sep 2024 12:20:27 -0400 Subject: [PATCH] fix deprecation notice --- .../src/markdown/createDeprecationNotice.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts index 591fb0f52..ec754e50a 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createDeprecationNotice.ts @@ -23,8 +23,9 @@ export function createDeprecationNotice({ return guard(deprecated, () => createAdmonition({ children: - clean(description) ?? - "This endpoint has been deprecated and may be replaced or removed in future versions of the API.", + description && description.length > 0 + ? clean(description) + : "This endpoint has been deprecated and may be replaced or removed in future versions of the API.", }) ); }