()
| 86 | const PRELOAD_PATH = fileURLToPath(new URL("../preload/index.js", import.meta.url)); |
| 87 | |
| 88 | const liveMainWindow = (): BrowserWindow | null => { |
| 89 | const window = mainWindow; |
| 90 | if (!window) return null; |
| 91 | if (window.isDestroyed()) { |
| 92 | mainWindow = null; |
| 93 | return null; |
| 94 | } |
| 95 | return window; |
| 96 | }; |
| 97 | |
| 98 | const destroyWindow = (window: BrowserWindow) => { |
| 99 | if (mainWindow === window) mainWindow = null; |
no outgoing calls
no test coverage detected