Remove listener don't add another one
This commit is contained in:
parent
c3d8f4090e
commit
9d22293927
|
@ -33,7 +33,7 @@ export default new class ReactDevtoolsModule extends BuiltinModule {
|
|||
|
||||
disabled(e) {
|
||||
electron.remote.BrowserWindow.removeDevToolsExtension('React Developer Tools');
|
||||
electron.remote.BrowserWindow.getAllWindows()[0].webContents.on('devtools-opened', this.devToolsOpened);
|
||||
electron.remote.BrowserWindow.getAllWindows()[0].webContents.removeListener('devtools-opened', this.devToolsOpened);
|
||||
}
|
||||
|
||||
devToolsOpened() {
|
||||
|
|
|
@ -33,7 +33,7 @@ export default new class VueDevtoolsModule extends BuiltinModule {
|
|||
|
||||
disabled(e) {
|
||||
electron.remote.BrowserWindow.removeDevToolsExtension('Vue.js devtools');
|
||||
electron.remote.BrowserWindow.getAllWindows()[0].webContents.on('devtools-opened', this.devToolsOpened);
|
||||
electron.remote.BrowserWindow.getAllWindows()[0].webContents.removeListener('devtools-opened', this.devToolsOpened);
|
||||
}
|
||||
|
||||
devToolsOpened() {
|
||||
|
|
Loading…
Reference in New Issue