Skip to content

Commit d56f17b

Browse files
committed
minor code quality
1 parent 8f98c7f commit d56f17b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/main/lang/programManager.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ function getOrCreateProject(filePath) {
105105
return project;
106106
}
107107
catch (ex) {
108-
if (ex.message === tsconfig.errors.GET_PROJECT_INVALID_PROJECT_FILE) {
108+
var err = ex;
109+
if (err.message === tsconfig.errors.GET_PROJECT_INVALID_PROJECT_FILE) {
109110
throw ex;
110111
}
111112
else {

lib/main/lang/programManager.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,16 @@ function getOrCreateProject(filePath): tsconfig.TypeScriptProjectFileDetails {
135135
var project = tsconfig.getProjectSync(filePath);
136136
return project;
137137
} catch (ex) {
138-
if (ex.message === tsconfig.errors.GET_PROJECT_INVALID_PROJECT_FILE) {
138+
var err: Error = ex;
139+
if (err.message === tsconfig.errors.GET_PROJECT_INVALID_PROJECT_FILE) {
139140
throw ex;
140141
}
141142
else {
142143
return tsconfig.createProjectRootSync(filePath);
143144
}
144145
}
145146
}
147+
}
146148

147149
export function getOrCreateProgram(filePath) {
148150
filePath = tsconfig.consistentPath(filePath);

0 commit comments

Comments
 (0)