summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGerrit Birkeland <gerrit@gerritbirkeland.com>2020-10-27 18:53:11 -0600
committerGerrit Birkeland <gerrit@gerritbirkeland.com>2020-10-27 18:53:11 -0600
commitee94f3bd12e9e08b74067b5eb0460fcdd77772c8 (patch)
tree9845aeaf87e7486a67eb2bd18772ecf03ae10ce3
parent5c34f5069aea47bdb936a46b5f8dd92aa3d3eec8 (diff)
fix: Use older JS syntax so it works on Node 10
-rw-r--r--typedoc-plugin-external-module-name/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/typedoc-plugin-external-module-name/index.js b/typedoc-plugin-external-module-name/index.js
index d4f5080..d59e36c 100644
--- a/typedoc-plugin-external-module-name/index.js
+++ b/typedoc-plugin-external-module-name/index.js
@@ -10,8 +10,10 @@ exports.load = function (host) {
/** @type {import("typedoc").ProjectReflection} */
const project = context.project;
- for (const mod of project.children.filter(child => child.kind === ReflectionKind.Module)) {
- const tag = mod.comment?.getTag('module');
+ for (const mod of (project.children || []).filter(
+ child => child.kind === ReflectionKind.Module,
+ )) {
+ const tag = mod.comment ? mod.comment.getTag('module') : void 0;
if (!tag) continue;
mod.name = tag.text;
mod.comment.removeTags('module');