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" ;
2
1
import { clipboard } from "electron/common" ;
3
2
import type { IpcMainEvent , WebContents } from "electron/main" ;
4
3
import {
@@ -306,18 +305,24 @@ function createMainWindow(): BrowserWindow {
306
305
app . on (
307
306
"certificate-error" ,
308
307
(
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
313
316
) => {
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 } :
318
322
319
323
${ error } `,
320
- ) ;
324
+ ) ;
325
+ }
321
326
} ,
322
327
) ;
323
328
You can’t perform that action at this time.
0 commit comments