diff --git a/CHANGELOG.md b/CHANGELOG.md index 01c061a54..5edef3908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ ### Bug Fixes -- Fix crash when converting `export default undefined`, #2175 +- Fix crash when converting `export default undefined`, #2175. +- Fix error in console when clicking on headings in the readme, #2170. ### Thanks! diff --git a/src/index.ts b/src/index.ts index d5b0fef5b..34cab7db7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,6 +14,7 @@ export { type Meaning, type MeaningKeyword, type ExternalResolveResult, + type ExternalSymbolResolver, } from "./lib/converter"; export { diff --git a/src/lib/output/themes/default/assets/typedoc/Application.ts b/src/lib/output/themes/default/assets/typedoc/Application.ts index e3f178f41..176cb8baf 100644 --- a/src/lib/output/themes/default/assets/typedoc/Application.ts +++ b/src/lib/output/themes/default/assets/typedoc/Application.ts @@ -76,10 +76,15 @@ export class Application { if (!reflAnchor) return; let reflContainer = reflAnchor.parentElement!; - while (reflContainer.tagName !== "SECTION") { + while (reflContainer && reflContainer.tagName !== "SECTION") { reflContainer = reflContainer.parentElement!; } + if (!reflContainer) { + // This is probably a link in the readme, doesn't have a containing section + return; + } + if (reflContainer.offsetParent == null) { this.alwaysVisibleMember = reflContainer;