fix ts errors

This commit is contained in:
Labhansh Agrawal 2020-09-15 20:24:35 +05:30 committed by Benjamin Staneck
parent 357742c6e5
commit 4543f1c32a
2 changed files with 2 additions and 2 deletions

View file

@ -6,7 +6,7 @@ declare module 'electron' {
plugins: typeof import('./plugins');
getWindows: () => Set<BrowserWindow>;
getLastFocusedWindow: () => BrowserWindow | null;
windowCallback: (win: BrowserWindow) => void;
windowCallback?: (win: BrowserWindow) => void;
createWindow: (fn?: (win: BrowserWindow) => void, options?: Record<string, any>) => BrowserWindow;
setVersion: (version: string) => void;
}

View file

@ -105,7 +105,7 @@ export function newWindow(
// and createWindow definition. It's executed in place of
// the callback passed as parameter, and deleted right after.
(app.windowCallback || fn)(window);
delete app.windowCallback;
app.windowCallback = undefined;
fetchNotifications(window);
// auto updates
if (!isDev) {