Skip to content

Commit 0c105ec

Browse files
committed
One last bugfix
1 parent 864db57 commit 0c105ec

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
for your use case, please open an issue.
1111
- Removed `--logger` option, to disable all logging, set the `logLevel` option to `none`.
1212
- Dropped support for legacy `[[link]]`s, removed deprecated `Reflection.findReflectionByName`.
13-
- Internal links are now only resolved with declaration references.
1413
- Added `@overload` to default ignored tags.
1514

1615
### API Breaking Changes
@@ -66,6 +65,7 @@
6665
- TypeDoc will now ignore a leading `v` in versions, #2212.
6766
- Category titles now render with the same format in the page index and heading title, #2196.
6867
- Fixed crash when using `typeof` on a reference with type arguments, #2220.
68+
- Fixed broken anchor links generated to signatures nested within objects.
6969

7070
### Thanks!
7171

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import { JSX } from "../../../../utils";
22
import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
33

4-
export const anchorIcon = (context: DefaultThemeRenderContext, anchor: string | undefined) => (
5-
<a href={`#${anchor}`} aria-label="Permalink" class="tsd-anchor-icon">
6-
{context.icons.anchor()}
7-
</a>
8-
);
4+
export function anchorIcon(context: DefaultThemeRenderContext, anchor: string | undefined) {
5+
if (!anchor) return <></>;
6+
7+
return (
8+
<a href={`#${anchor}`} aria-label="Permalink" class="tsd-anchor-icon">
9+
{context.icons.anchor()}
10+
</a>
11+
);
12+
}

0 commit comments

Comments
 (0)