Skip to content

Commit f837c8e

Browse files
committed
Fix converter
1 parent 5a7ae3f commit f837c8e

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

demo-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@ngtools/webpack": "~7.0.0",
3333
"nativescript-dev-typescript": "^0.7.6",
3434
"nativescript-dev-webpack": "^0.18.0",
35-
"tns-platform-declarations": "file:../src/node_modules/tns-platform-declarations",
35+
"tns-platform-declarations": "^5.0.2",
3636
"tslint": "^5.8.0",
3737
"typescript": "~3.1.1"
3838
},

src/hooks/converter.common.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,9 @@ export abstract class ConverterCommon {
6969
}
7070

7171
protected writeFileSyncIfNeeded(filePath: string, content: string): this {
72-
try {
73-
if (content !== fs.readFileSync(filePath, "utf8")) {
74-
fs.writeFileSync(filePath, content, { encoding: "utf8" });
75-
}
76-
}
72+
try { if (content === fs.readFileSync(filePath, "utf8")) { return this; } }
7773
catch (error) {}
74+
fs.writeFileSync(filePath, content, { encoding: "utf8" });
7875
return this;
7976
}
8077
}

0 commit comments

Comments
 (0)