mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
ELECTRON-491 - Change method to use getFocusedWindow instead of fromWebContents (#368)
This commit is contained in:
parent
c36b639296
commit
2362febc58
@ -515,7 +515,10 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
|||||||
|
|
||||||
if (!userPermission) {
|
if (!userPermission) {
|
||||||
let fullMessage = `Your administrator has disabled ${message}. Please contact your admin for help.`;
|
let fullMessage = `Your administrator has disabled ${message}. Please contact your admin for help.`;
|
||||||
electron.dialog.showMessageBox(BrowserWindow.fromWebContents(webContents), {type: 'error', title: 'Permission Denied!', message: fullMessage});
|
const browserWindow = BrowserWindow.getFocusedWindow();
|
||||||
|
if (browserWindow && !browserWindow.isDestroyed()) {
|
||||||
|
electron.dialog.showMessageBox(browserWindow, {type: 'error', title: 'Permission Denied!', message: fullMessage});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return cb(userPermission);
|
return cb(userPermission);
|
||||||
|
Loading…
Reference in New Issue
Block a user