Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
refactor: switch to session.removeExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Nov 19, 2020
1 parent 03b2385 commit e4234ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* When running `npm run build` or `npm run build-main`, this file is compiled to
* `/dist/main.js` using webpack. This gives us some performance wins.
*/
import { app, BrowserWindow } from 'electron'
import { app, session, BrowserWindow } from 'electron'
import isDev from 'electron-is-dev'
import installExtension, {
REACT_DEVELOPER_TOOLS,
Expand Down Expand Up @@ -397,8 +397,8 @@ app.on('ready', async () => {
*/
if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD) {
if (process.env.REINSTALL_DEVTOOLS) {
BrowserWindow.removeDevToolsExtension(REACT_DEVELOPER_TOOLS)
BrowserWindow.removeDevToolsExtension(REDUX_DEVTOOLS)
session.removeExtension(REACT_DEVELOPER_TOOLS)
session.removeExtension(REDUX_DEVTOOLS)
}

installExtension(REACT_DEVELOPER_TOOLS)
Expand Down

0 comments on commit e4234ee

Please sign in to comment.