From 2d77cbdc06d7b0ef9a3e653ce0bae86a6b38a79e Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Tue, 2 Jun 2015 10:49:22 -0700 Subject: [PATCH] cleaner hasNonAmbientClass --- src/compiler/binder.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 975f890927e..30514c84e40 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -139,11 +139,9 @@ module ts { * Checks if the symbol contains a class declaration that is non-ambient. */ function hasNonAmbientClass(symbol: Symbol): boolean { - if (symbol) { - return forEach(symbol.declarations, (element: Declaration) => { - return element.kind === SyntaxKind.ClassDeclaration && !(element.flags & NodeFlags.Ambient); - }); - } + return symbol && forEach(symbol.declarations, (element: Declaration) => { + return element.kind === SyntaxKind.ClassDeclaration && !(element.flags & NodeFlags.Ambient); + }); } /**