From 93a48a314e4c425f30335f06129080e6f5623697 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 4 Aug 2014 16:56:58 -0700 Subject: [PATCH] respond to code review comments --- src/services/services.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 6f727248df..849b43fa50 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1270,16 +1270,21 @@ module ts { function programUpToDate(): boolean { // If we haven't create a program yet, then it is not up-to-date - if (!program) return false; + if (!program) { + return false; + } // If number of files in the program do not match, it is not up-to-date var hostFilenames = hostCache.getFilenames(); - if (program.getSourceFiles().length !== hostFilenames.length) return false; + if (program.getSourceFiles().length !== hostFilenames.length) { + return false; + } // If any file is not up-to-date, then the whole program is not up-to-date for (var i = 0, n = hostFilenames.length; i < n; i++) { - if (!sourceFileUpToDate(program.getSourceFile(hostFilenames[i]))) + if (!sourceFileUpToDate(program.getSourceFile(hostFilenames[i]))) { return false; + } } // If the compilation settings do no match, then the program is not up-to-date