@@ -83,14 +83,15 @@ function createWindow() {
8383 // This provides a method for updating the configuration over time
8484 if ( store . get ( 'version' ) === app . getVersion ( ) ) {
8585 // Update Not Required For Client
86- } else if (
87- store . get ( 'version' ) === '2.0.4' && // TODO: Allow this to be automatic and work again for future releases
88- store . get ( 'services' ) . length === 4
89- ) {
90- // Automatic Config Update
91- store . set ( 'services' , require ( './default-services' ) ) ;
92- store . set ( 'version' , app . getVersion ( ) ) ;
93- console . log ( 'Automatically updated default services in your config' ) ;
86+ // TODO: Make this automatic detection and updating more stable then release
87+ // } else if (
88+ // store.get('version') === '2.0.4' && // TODO: Allow this to be automatic and work again for future releases
89+ // store.get('services').length === 4
90+ // ) {
91+ // // Automatic Config Update
92+ // store.set('services', require('./default-services'));
93+ // store.set('version', app.getVersion());
94+ // console.log('Automatically updated default services in your config');
9495 } else {
9596 // Manual Config Update
9697 let options = {
@@ -110,7 +111,6 @@ function createWindow() {
110111 if ( response == 0 ) {
111112 store . clear ( ) ;
112113 app . emit ( 'relaunch' ) ;
113- app . exit ( ) ;
114114 console . log ( 'Reset Configuration and Restarting Electron' ) ;
115115 return ;
116116 } else {
@@ -174,7 +174,10 @@ function broswerWindowDomReady() {
174174 store . get ( 'options.pictureInPicture' ) ||
175175 store . get ( 'options.hideWindowFrame' )
176176 ) {
177- mainWindow . webContents . executeJavaScript ( headerScript ) ;
177+ // TODO: This is a temp fix and a propper fix should be developed
178+ if ( mainWindow != null ) {
179+ mainWindow . webContents . executeJavaScript ( headerScript ) ;
180+ }
178181 }
179182}
180183
@@ -191,7 +194,9 @@ app.on('relaunch', () => {
191194 console . log ( 'Relaunching The Application!' ) ;
192195
193196 // Store details to remeber when relaunched
194- store . set ( 'relaunch.toPage' , mainWindow . webContents . getURL ( ) ) ;
197+ if ( mainWindow . webContents . getURL ( ) != '' ) {
198+ store . set ( 'relaunch.toPage' , mainWindow . webContents . getURL ( ) ) ;
199+ }
195200 store . set ( 'relaunch.windowDetails' , {
196201 position : mainWindow . getPosition ( ) ,
197202 size : mainWindow . getSize ( )
0 commit comments