From 50fceff47c2b1c32d9ceb37801ba73fd92bfec8f Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Mon, 17 Jun 2024 13:45:54 +0530 Subject: [PATCH] SDA-4587 - Upgrade electron version to 30.1.0 (#2165) --- package-lock.json | 14 +++++++------- package.json | 2 +- src/app/window-handler.ts | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8d0157b67..07eb28e48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "builder-util-runtime": "^9.0.3", "cross-env": "7.0.3", "del": "3.0.0", - "electron": "29.3.1", + "electron": "30.1.0", "electron-builder": "^24.13.2", "electron-devtools-installer": "^3.2.0", "electron-icon-maker": "0.0.5", @@ -6338,9 +6338,9 @@ } }, "node_modules/electron": { - "version": "29.3.1", - "resolved": "https://repo.symphony.com/artifactory/api/npm/npm-virtual-dev/electron/-/electron-29.3.1.tgz", - "integrity": "sha512-auge1/6RVqgUd6TgIq88wKdUCJi2cjESi3jy7d+6X4JzvBGprKBqMJ8JSSFpu/Px1YJrFUKAxfy6SC+TQf1uLw==", + "version": "30.1.0", + "resolved": "https://repo.symphony.com/artifactory/api/npm/npm-virtual-dev/electron/-/electron-30.1.0.tgz", + "integrity": "sha512-9O8m7kinjwMH5Df0hpXbwUaqI6pk3aJm1sKQUkQGCF7NDbNkGhu2BXgqaicPU6oe26zQPc5vtwWnHmiKlh1hYA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -22404,9 +22404,9 @@ } }, "electron": { - "version": "29.3.1", - "resolved": "https://repo.symphony.com/artifactory/api/npm/npm-virtual-dev/electron/-/electron-29.3.1.tgz", - "integrity": "sha512-auge1/6RVqgUd6TgIq88wKdUCJi2cjESi3jy7d+6X4JzvBGprKBqMJ8JSSFpu/Px1YJrFUKAxfy6SC+TQf1uLw==", + "version": "30.1.0", + "resolved": "https://repo.symphony.com/artifactory/api/npm/npm-virtual-dev/electron/-/electron-30.1.0.tgz", + "integrity": "sha512-9O8m7kinjwMH5Df0hpXbwUaqI6pk3aJm1sKQUkQGCF7NDbNkGhu2BXgqaicPU6oe26zQPc5vtwWnHmiKlh1hYA==", "dev": true, "requires": { "@electron/get": "^2.0.0", diff --git a/package.json b/package.json index 01daa1a40..909db176d 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "builder-util-runtime": "^9.0.3", "cross-env": "7.0.3", "del": "3.0.0", - "electron": "30.0.9", + "electron": "30.1.0", "electron-builder": "^24.13.2", "electron-devtools-installer": "^3.2.0", "electron-icon-maker": "0.0.5", diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 9a7bd95f9..2bc118544 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -529,7 +529,7 @@ export class WindowHandler { // Event needed to hide native menu bar on Windows 10 as we use custom menu bar this.mainWebContents.once('did-start-loading', () => { logger.info( - `window-handler: main window web contents started loading for url ${this.mainView?.webContents.getURL()}!`, + `window-handler: main window web contents started loading for url ${this.mainView?.webContents?.getURL()}!`, ); this.finishedLoading = false; this.listenForLoad(); @@ -652,7 +652,7 @@ export class WindowHandler { // workaround for https://perzoinc.atlassian.net/browse/SDA-4251 this.mainWindow?.on('focus', () => { const mainView = this.getMainView(); - mainView?.webContents.focus(); + mainView?.webContents?.focus(); if ( this.mainWindow && windowExists(this.mainWindow) &&