Skip to content

Commit 80ed807

Browse files
authored
fix(plugin): account for versions with no paths (#2865)
1 parent 6172dfa commit 80ed807

File tree

1 file changed

+6
-1
lines changed
  • plugins/docusaurus-plugin-ionic-component-api

1 file changed

+6
-1
lines changed

plugins/docusaurus-plugin-ionic-component-api/index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ module.exports = function (context, options) {
4949
await generateMarkdownForVersion(version, npmTag, false);
5050
}
5151

52-
const npmTag = currentVersion.banner === 'unreleased' ? 'next' : currentVersion.path.slice(1);
52+
let npmTag = 'latest';
53+
if (currentVersion.banner === 'unreleased') {
54+
npmTag = 'next';
55+
} else if (currentVersion.path !== undefined) {
56+
npmTag = currentVersion.path.slice(1);
57+
}
5358
// Latest version
5459
await generateMarkdownForVersion(currentVersion.path, npmTag, true);
5560

0 commit comments

Comments
 (0)