Skip to content

Commit 01d09f8

Browse files
committed
fix: second instance check
1 parent c8e0dd9 commit 01d09f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/app-management/electron/events/second-instance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Event } from "electron";
1+
import type { BrowserWindow, Event } from "electron";
22
import logger from "../../../logwrapper";
33

44
export async function secondInstance(event: Event, argv: string[]) {
@@ -10,7 +10,7 @@ export async function secondInstance(event: Event, argv: string[]) {
1010
try {
1111
logger.debug("Second instance detected, focusing main window.");
1212

13-
const { mainWindow } = await import("../window-management");
13+
const mainWindow = globalThis.mainWindow as BrowserWindow;
1414
if (mainWindow) {
1515
if (!mainWindow.isVisible()) {
1616
mainWindow.show();

0 commit comments

Comments
 (0)