Skip to content

Commit 0227864

Browse files
committed
fix(tsconfig) udefined check.
closes #703 (comment)
1 parent c49590c commit 0227864

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/main/tsconfig/tsconfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ function getProjectSync(pathOrSrcFile) {
215215
}
216216
if (projectSpec.filesGlob) {
217217
var prettyJSONProjectSpec = prettyJSON(projectSpec, detectIndent(projectFileTextContent).indent);
218-
if (prettyJSONProjectSpec !== projectFileTextContent && projectSpec.atom.rewriteTsconfig) {
218+
if (prettyJSONProjectSpec !== projectFileTextContent && projectSpec.atom && projectSpec.atom.rewriteTsconfig) {
219219
fs.writeFileSync(projectFile, prettyJSONProjectSpec);
220220
}
221221
}

lib/main/tsconfig/tsconfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ export function getProjectSync(pathOrSrcFile: string): TypeScriptProjectFileDeta
399399
if (projectSpec.filesGlob) { // for filesGlob we keep the files in sync
400400
var prettyJSONProjectSpec = prettyJSON(projectSpec, detectIndent(projectFileTextContent).indent);
401401

402-
if (prettyJSONProjectSpec !== projectFileTextContent && projectSpec.atom.rewriteTsconfig) {
402+
if (prettyJSONProjectSpec !== projectFileTextContent && projectSpec.atom && projectSpec.atom.rewriteTsconfig) {
403403
fs.writeFileSync(projectFile, prettyJSONProjectSpec);
404404
}
405405
}

0 commit comments

Comments
 (0)