File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -198,22 +198,17 @@ process.on('SIGINT', () => {
198198} ) ;
199199
200200app . on ( 'will-quit' , ( ) => {
201- powerSaveBlocker . stop ( powerSaveBlockerId ) ;
201+ try {
202+ powerSaveBlocker . stop ( powerSaveBlockerId ) ;
203+ } catch ( e ) {
204+ console . log ( e ) ;
205+ }
202206} ) ;
203207
204208if ( ! gotTheLock ) {
205209 app . quit ( ) ;
206210} else {
207- app . on ( 'second-instance' , ( event , commandLine , workingDirectory ) => {
208- // This event is emitted when a second instance is started
209- // You can focus your app window here instead of starting a new one
210- if ( mainWindow ) {
211- if ( mainWindow . isMinimized ( ) ) mainWindow . restore ( ) ;
212- mainWindow . focus ( ) ;
213- }
214- } ) ;
215-
216-
211+ startserver ( ) ;
217212 app . whenReady ( ) . then ( ( ) => {
218213 powerSaveBlockerId = powerSaveBlocker . start ( 'prevent-app-suspension' ) ;
219214 s_mainWindow = createWindow ( ) ;
@@ -606,5 +601,3 @@ function fmt(spotDate) {
606601 retstr . t = h . padStart ( 2 , '0' ) + i . padStart ( 2 , '0' ) + s . padStart ( 2 , '0' ) ;
607602 return retstr ;
608603}
609-
610- startserver ( ) ;
You can’t perform that action at this time.
0 commit comments