Skip to content

Commit

Permalink
Fix TS error
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Jan 5, 2024
1 parent b07dc6c commit 877dbb8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/api-docs-builder/ApiBuilders/ComponentApiBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ export async function computeApiDescription(
const file = await remark()
.use(function docsLinksAttacher() {
return function transformer(tree) {
remarkVisit(tree, 'link', (linkNode: Link) => {
if ((linkNode.url as string).startsWith('/')) {
linkNode.url = `${host}${linkNode.url}`;
remarkVisit(tree, 'link', (linkNode) => {
const link = linkNode as Link;
if ((link.url as string).startsWith('/')) {
link.url = `${host}${link.url}`;
}
});
};
Expand Down

0 comments on commit 877dbb8

Please sign in to comment.