Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/react-devtools/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

const {app, BrowserWindow} = require('electron'); // Module to create native browser window.
const {app, BrowserWindow, shell} = require('electron'); // Module to create native browser window.
const {join} = require('path');
const os = require('os');

Expand Down Expand Up @@ -40,9 +40,9 @@ app.on('ready', function () {
}

// https://stackoverflow.com/questions/32402327/
mainWindow.webContents.on('new-window', function (event, url) {
event.preventDefault();
require('electron').shell.openExternal(url);
mainWindow.webContents.setWindowOpenHandler(({url}) => {
shell.openExternal(url);
return {action: 'deny'};
});

// and load the index.html of the app.
Expand Down