Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a7d042a

Browse files
committed
bugfixes
1 parent 2c0bc4c commit a7d042a

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/src/app.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import _ from "lodash";
12
import action from "./store/action";
23
import FileSystem from "./modules/file-system";
34
import AppFolders from "./modules/app-folders";
@@ -89,6 +90,12 @@ class App {
8990
.then(() => this.getAppFolders().create())
9091
.then(() => this.getMountWine().mount())
9192
.then(() => this.getMountData().mount())
93+
.then(() => {
94+
let configs = this.CONFIG.findConfigs();
95+
if (configs.length > 0) {
96+
this.CONFIG.setFlatConfig(_.head(configs).getFlatConfig());
97+
}
98+
})
9299
.then(() => this.getWinePrefix().create());
93100

94101
return promise;

src/src/modules/utils.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ export default class Utils {
2222
return null;
2323
}
2424

25-
let result = JSON.parse(text);
26-
27-
if (!result) {
25+
try {
26+
return JSON.parse(text);
27+
} catch (e) {
2828
return null;
2929
}
30-
31-
return result;
3230
}
3331

3432
/**

0 commit comments

Comments
 (0)