From b9778e6d20b9a96f40ece46d08d23df8cfc4c6bd Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 11 Nov 2015 10:31:09 -0800 Subject: [PATCH] cr feedback --- src/server/editorServices.ts | 6 +++--- src/server/session.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 45d987ea534..889c96b6c4e 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -1006,7 +1006,7 @@ namespace ts.server { /** * @param filename is absolute pathname - * @param fileContent is a known version of the file content that is more up to date + * @param fileContent is a known version of the file content that is more up to date than the one on disk */ openFile(fileName: string, openedByClient: boolean, fileContent?: string) { fileName = ts.normalizePath(fileName); @@ -1014,7 +1014,7 @@ namespace ts.server { if (!info) { let content: string; if (this.host.fileExists(fileName)) { - content = fileContent ? fileContent : this.host.readFile(fileName); + content = fileContent || this.host.readFile(fileName); } if (!content) { if (openedByClient) { @@ -1061,7 +1061,7 @@ namespace ts.server { /** * Open file whose contents is managed by the client * @param filename is absolute pathname - * @param fileContent is a known version of the file content that is more up to date + * @param fileContent is a known version of the file content that is more up to date than the one on disk */ openClientFile(fileName: string, fileContent?: string) { this.openOrUpdateConfiguredProjectForFile(fileName); diff --git a/src/server/session.ts b/src/server/session.ts index c589c528ec2..f04f73f644c 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -534,7 +534,7 @@ namespace ts.server { /** * @param fileName is the name of the file to be opened - * @param fileContent is a version of the file content that is known to be more up to date + * @param fileContent is a version of the file content that is known to be more up to date than the one on disk */ private openClientFile(fileName: string, fileContent?: string) { const file = ts.normalizePath(fileName);