From 880202d9828fefe49dd458a5cb67f341133dcf0a Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 21 Jul 2015 09:05:56 -0700 Subject: [PATCH] Clean up some code --- src/compiler/emitter.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 16ad4e2e206..2e2eaabd9cc 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -6763,17 +6763,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // If removeComments flag is false, then do not filter out any comment if (!removeComments || !ranges) return ranges; - // IF removeComments flag is true, then filter out comment by following: + // If removeComments flag is true, then filter out comment by following: // - Pinned comments : keep all // - /// comments : keep it if the comments are at the top of the file otherwise remove // - normal comments: remove all if (removeComments) { - if (isTopOfFileComments) { - ranges = filter(ranges, isTripleSlashOrPinnedComments); - } - else { - ranges = filter(ranges, isPinnedComments); - } + ranges = isTopOfFileComments ? filter(ranges, isTripleSlashOrPinnedComments) : filter(ranges, isPinnedComments); return ranges.length === 0 ? undefined : ranges; } }