diff options
author | 2018-11-15 12:21:28 +0100 | |
---|---|---|
committer | 2018-11-15 12:21:28 +0100 | |
commit | 8f5de18c754230540f731dbd12828ad8b850d1f2 (patch) | |
tree | dc5347ea0d5e5265923f058f6607b7b41bf7a0a9 /src | |
parent | Cleanup (diff) | |
download | ferdium-app-8f5de18c754230540f731dbd12828ad8b850d1f2.tar.gz ferdium-app-8f5de18c754230540f731dbd12828ad8b850d1f2.tar.zst ferdium-app-8f5de18c754230540f731dbd12828ad8b850d1f2.zip |
Fix minor issues due to babel upgrade
Diffstat (limited to 'src')
-rw-r--r-- | src/api/server/ServerApi.js | 2 | ||||
-rw-r--r-- | src/index.js | 5 | ||||
-rw-r--r-- | src/stores/SettingsStore.js | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/api/server/ServerApi.js b/src/api/server/ServerApi.js index 353faa7f4..2e80e520b 100644 --- a/src/api/server/ServerApi.js +++ b/src/api/server/ServerApi.js | |||
@@ -35,7 +35,7 @@ module.paths.unshift( | |||
35 | ); | 35 | ); |
36 | 36 | ||
37 | const { app } = remote; | 37 | const { app } = remote; |
38 | const fetch = remote.require('electron-fetch'); | 38 | const { default: fetch } = remote.require('electron-fetch'); |
39 | 39 | ||
40 | const SERVER_URL = API; | 40 | const SERVER_URL = API; |
41 | const API_VERSION = 'v1'; | 41 | const API_VERSION = 'v1'; |
diff --git a/src/index.js b/src/index.js index 5ba901b89..5fbe3bc4f 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -19,6 +19,11 @@ const debug = require('debug')('App'); | |||
19 | let mainWindow; | 19 | let mainWindow; |
20 | let willQuitApp = false; | 20 | let willQuitApp = false; |
21 | 21 | ||
22 | // DEV MODE: Save user data into FranzDev | ||
23 | if (isDevMode) { | ||
24 | app.setPath('userData', path.join(app.getPath('appData'), 'FranzDev')); | ||
25 | } | ||
26 | |||
22 | // Ensure that the recipe directory exists | 27 | // Ensure that the recipe directory exists |
23 | fs.emptyDirSync(path.join(app.getPath('userData'), 'recipes', 'temp')); | 28 | fs.emptyDirSync(path.join(app.getPath('userData'), 'recipes', 'temp')); |
24 | fs.ensureFileSync(path.join(app.getPath('userData'), 'window-state.json')); | 29 | fs.ensureFileSync(path.join(app.getPath('userData'), 'window-state.json')); |
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index d8519c609..9270a6481 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -68,7 +68,7 @@ export default class SettingsStore extends Store { | |||
68 | 68 | ||
69 | // Helper | 69 | // Helper |
70 | _migrate() { | 70 | _migrate() { |
71 | const legacySettings = localStorage.getItem('app'); | 71 | const legacySettings = localStorage.getItem('app') || {}; |
72 | 72 | ||
73 | if (!this.all.migration['5.0.0-beta.17-settings']) { | 73 | if (!this.all.migration['5.0.0-beta.17-settings']) { |
74 | this.actions.settings.update({ | 74 | this.actions.settings.update({ |