File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed
Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change 1- import type { Event } from "electron/common" ;
21import { clipboard } from "electron/common" ;
32import type { IpcMainEvent , WebContents } from "electron/main" ;
43import {
@@ -306,18 +305,24 @@ function createMainWindow(): BrowserWindow {
306305 app . on (
307306 "certificate-error" ,
308307 (
309- event : Event ,
310- webContents : WebContents ,
311- urlString : string ,
312- error : string ,
308+ event ,
309+ webContents ,
310+ urlString ,
311+ error ,
312+ certificate ,
313+ callback ,
314+ isMainFrame ,
315+ // eslint-disable-next-line max-params
313316 ) => {
314- const url = new URL ( urlString ) ;
315- dialog . showErrorBox (
316- "Certificate error" ,
317- `The server presented an invalid certificate for ${ url . origin } :
317+ if ( isMainFrame ) {
318+ const url = new URL ( urlString ) ;
319+ dialog . showErrorBox (
320+ "Certificate error" ,
321+ `The server presented an invalid certificate for ${ url . origin } :
318322
319323${ error } `,
320- ) ;
324+ ) ;
325+ }
321326 } ,
322327 ) ;
323328
You can’t perform that action at this time.
0 commit comments