From c0774d577e9f2d7cce282297111e4ae978100164 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Wed, 29 Mar 2023 16:45:57 -0400 Subject: [PATCH] Update index.js --- plugins/docusaurus-plugin-ionic-component-api/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/docusaurus-plugin-ionic-component-api/index.js b/plugins/docusaurus-plugin-ionic-component-api/index.js index 8e12c52ad3a..40c66550e89 100644 --- a/plugins/docusaurus-plugin-ionic-component-api/index.js +++ b/plugins/docusaurus-plugin-ionic-component-api/index.js @@ -49,7 +49,12 @@ module.exports = function (context, options) { await generateMarkdownForVersion(version, npmTag, false); } - const npmTag = currentVersion.banner === 'unreleased' ? 'next' : currentVersion.path.slice(1); + let npmTag = 'latest'; + if (currentVersion.banner === 'unreleased') { + npmTag = 'next'; + } else if (currentVersion.path !== undefined) { + npmTag = currentVersion.path.slice(1); + } // Latest version await generateMarkdownForVersion(currentVersion.path, npmTag, true);