1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Fixed tests

This commit is contained in:
Laurent Cozic
2021-02-09 20:58:17 +00:00
parent b7f37fdf89
commit 9bfc7d9860

View File

@@ -16,12 +16,12 @@ export default class FileHandler {
}
public async load(): Promise<SettingValues> {
if (this.valueJsonCache_) return JSON.parse(this.valueJsonCache_);
if (!(await shim.fsDriver().exists(this.filePath_))) {
this.valueJsonCache_ = '{}';
} else {
this.valueJsonCache_ = await shim.fsDriver().readFile(this.filePath_, 'utf8');
if (!this.valueJsonCache_) {
if (!(await shim.fsDriver().exists(this.filePath_))) {
this.valueJsonCache_ = '{}';
} else {
this.valueJsonCache_ = await shim.fsDriver().readFile(this.filePath_, 'utf8');
}
}
try {