From fbe939a4639651d3800c35fdceaa44a35b31fec1 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 26 Nov 2023 14:48:02 -0700 Subject: [PATCH] Only display hierarchy if useful --- CHANGELOG.md | 1 + src/lib/converter/plugins/TypePlugin.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75916554b..9300c731f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Fixed an infinite loop when `skipLibCheck` is used to ignore some compiler errors, #2438. - `@example` tag titles will now be rendered in the example heading, #2440. - Correctly handle transient symbols in `@namespace`-created namespaces, #2444. +- TypeDoc no longer displays the "Hierarchy" section if there is no inheritance hierarchy to display. ### Thanks! diff --git a/src/lib/converter/plugins/TypePlugin.ts b/src/lib/converter/plugins/TypePlugin.ts index 2afada09f..13c946978 100644 --- a/src/lib/converter/plugins/TypePlugin.ts +++ b/src/lib/converter/plugins/TypePlugin.ts @@ -158,7 +158,10 @@ export class TypePlugin extends ConverterComponent { push(reflection.extendedBy); } - reflection.typeHierarchy = root; + // No point setting up a hierarchy if there is no hierarchy to display + if (root.next) { + reflection.typeHierarchy = root; + } }); } }