File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 Menu
1010} = require ( 'electron' ) ;
1111const windowStateKeeper = require ( 'electron-window-state' ) ;
12- const Configuration = require ( './app/public/js/common/configLocation' ) ;
12+ const configuration = require ( './app/public/js/common/configLocation' ) ;
1313
1414// custom constants
1515const clientId = '342b8a7af638944906dcdb46f9d56d98' ;
@@ -24,9 +24,9 @@ app.on('ready', () => {
2424} ) ;
2525
2626function checkUserConfig ( ) {
27- const userConfigExists = Configuration . configExists ;
27+ const containsConfig = configuration . containsConfig ( ) ;
2828
29- if ( userConfigExists ) {
29+ if ( containsConfig ) {
3030 initMainWindow ( ) ;
3131 } else {
3232 authenticateUser ( ) ;
@@ -71,7 +71,7 @@ function authenticateUser() {
7171}
7272
7373function setUserData ( accessToken ) {
74- fs . writeFileSync ( Configuration . path , JSON . stringify ( {
74+ fs . writeFileSync ( configuration . getPath ( ) , JSON . stringify ( {
7575 accessToken : accessToken ,
7676 clientId : clientId
7777 } ) , 'utf-8' ) ;
@@ -263,4 +263,4 @@ function menuBar() {
263263
264264 const menu = Menu . buildFromTemplate ( template ) ;
265265 Menu . setApplicationMenu ( menu )
266- }
266+ }
You can’t perform that action at this time.
0 commit comments