Skip to content

Commit 3dbbccf

Browse files
committed
fix(vscode): handle api type in openDocs command
The command was missing a condition to handle the 'api' type, causing incorrect URL generation. This adds the missing branch to properly construct API documentation URLs.
1 parent 01ec938 commit 3dbbccf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/vscode/src/commands/openDocs.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ async function openDocs (type: 'api' | 'component', componentName?: string) {
3535
url = slug
3636
? `${baseUrl}/components/${slug}`
3737
: `${baseUrl}/components/${componentName}`
38+
} else if (type === 'api') {
39+
url = `${baseUrl}/api/${componentName}`
3840
}
3941

4042
if (version && version !== '0.0.0') {

0 commit comments

Comments
 (0)