fix: type internal APIs that can return null properly (#29852)

This commit is contained in:
Milan Burda 2021-07-27 07:48:12 +02:00 committed by GitHub
parent 461db8f1ab
commit a545cd3790
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 12 deletions

View file

@ -193,7 +193,7 @@ const attachGuest = function (event: Electron.IpcMainInvokeEvent,
]);
// Inherit certain option values from embedder
const lastWebPreferences = embedder.getLastWebPreferences();
const lastWebPreferences = embedder.getLastWebPreferences()!;
for (const [name, value] of inheritedWebPreferences) {
if (lastWebPreferences[name as keyof Electron.WebPreferences] === value) {
(webPreferences as any)[name] = value;