diff options
author | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-08-08 00:01:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-08 05:31:37 +0530 |
commit | 97d51a7763b14c92ee71ff9a012311dd9498d803 (patch) | |
tree | bd36005031ecb1148f27aa541e7a92a5e3aa4c0c /src/models/Service.js | |
parent | 5.6.1-nightly.17 [skip ci] (diff) | |
download | ferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.tar.gz ferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.tar.zst ferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.zip |
refactor: path-references refactoring and using 'import' instead of 'require' (#1752)
* refactor references to 'userData' and 'appData' directories to move hardcoding into single location
* convert to es6 for lower memory usage as per https://codesource.io/the-difference-between-import-and-require-in-javascript/
Diffstat (limited to 'src/models/Service.js')
-rw-r--r-- | src/models/Service.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/models/Service.js b/src/models/Service.js index 79181186a..fe56e5a76 100644 --- a/src/models/Service.js +++ b/src/models/Service.js | |||
@@ -2,7 +2,7 @@ import { autorun, computed, observable } from 'mobx'; | |||
2 | import { ipcRenderer } from 'electron'; | 2 | import { ipcRenderer } from 'electron'; |
3 | import { webContents } from '@electron/remote'; | 3 | import { webContents } from '@electron/remote'; |
4 | import normalizeUrl from 'normalize-url'; | 4 | import normalizeUrl from 'normalize-url'; |
5 | import path from 'path'; | 5 | import { join } from 'path'; |
6 | 6 | ||
7 | import { todosStore } from '../features/todos'; | 7 | import { todosStore } from '../features/todos'; |
8 | import { isValidExternalURL } from '../helpers/url-helpers'; | 8 | import { isValidExternalURL } from '../helpers/url-helpers'; |
@@ -230,7 +230,7 @@ export default class Service { | |||
230 | return this.iconUrl; | 230 | return this.iconUrl; |
231 | } | 231 | } |
232 | 232 | ||
233 | return path.join(this.recipe.path, 'icon.svg'); | 233 | return join(this.recipe.path, 'icon.svg'); |
234 | } | 234 | } |
235 | 235 | ||
236 | @computed get hasCustomIcon() { | 236 | @computed get hasCustomIcon() { |