refactor: use optional chaining / nullish coalescing operator (#35217)
This commit is contained in:
parent
76431ac1fa
commit
34b985c556
5 changed files with 7 additions and 8 deletions
|
@ -38,8 +38,8 @@ function makeWebPreferences (embedder: Electron.WebContents, params: Record<stri
|
|||
: null;
|
||||
|
||||
const webPreferences: Electron.WebPreferences = {
|
||||
nodeIntegration: params.nodeintegration != null ? params.nodeintegration : false,
|
||||
nodeIntegrationInSubFrames: params.nodeintegrationinsubframes != null ? params.nodeintegrationinsubframes : false,
|
||||
nodeIntegration: params.nodeintegration ?? false,
|
||||
nodeIntegrationInSubFrames: params.nodeintegrationinsubframes ?? false,
|
||||
plugins: params.plugins,
|
||||
zoomFactor: embedder.zoomFactor,
|
||||
disablePopups: !params.allowpopups,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue