From 400fc30e9d54d8baaaa6745c593625ecb8840e51 Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Thu, 6 Aug 2015 14:31:52 -0700 Subject: [PATCH] simplified a conditional --- src/compiler/binder.ts | 2 +- src/harness/fourslash.ts | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index beba5f0c656..2ecaf7aac75 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1062,4 +1062,4 @@ namespace ts { : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); } } -} +} \ No newline at end of file diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index c44fa9dbc09..e46469a35d2 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -1946,12 +1946,11 @@ module FourSlash { let actual = this.languageService.getDocCommentTemplateAtPosition(this.activeFile.fileName, this.currentCaretPosition); if (expected === undefined) { - if (actual === undefined) { - return; - } - else { + if (actual) { this.raiseError(name + ' failed - expected no template but got {newText: \"' + actual.newText + '\" caretOffset: ' + actual.caretOffset + '}'); } + + return; } else { if (actual === undefined) {