From 2a3800965b13c036789a131477a60fc8fd74d622 Mon Sep 17 00:00:00 2001 From: DLehenbauer Date: Tue, 28 Feb 2017 07:31:01 -0800 Subject: [PATCH] Fix TypeError when JSDoc.tags is undefined (see #14362) --- src/compiler/utilities.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 66bf693d831..2ab2fc2fc23 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1554,7 +1554,10 @@ namespace ts { } } else { - result.push(...filter((doc as JSDoc).tags, tag => tag.kind === kind)); + const tags = (doc as JSDoc).tags; + if (tags) { + result.push(...filter(tags, tag => tag.kind === kind)); + } } } return result;