From 1baea882467d1254deac181b9f1fe66a36caab1d Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Mon, 2 Nov 2015 17:04:59 -0800 Subject: [PATCH] shorten function --- src/compiler/checker.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0bb87337466..f8da1edaeed 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14911,11 +14911,7 @@ namespace ts { if (!moduleSymbol) { return undefined; } - const moduleDeclaration = getDeclarationOfKind(moduleSymbol, SyntaxKind.SourceFile) as SourceFile; - if (!moduleDeclaration) { - return undefined; - } - return moduleDeclaration; + return getDeclarationOfKind(moduleSymbol, SyntaxKind.SourceFile) as SourceFile; } function initializeTypeChecker() {