()
| 94 | const PRELOAD_PATH = fileURLToPath(new URL("../preload/index.js", import.meta.url)); |
| 95 | |
| 96 | const liveMainWindow = (): BrowserWindow | null => { |
| 97 | const window = mainWindow; |
| 98 | if (!window) return null; |
| 99 | if (window.isDestroyed()) { |
| 100 | mainWindow = null; |
| 101 | return null; |
| 102 | } |
| 103 | return window; |
| 104 | }; |
| 105 | |
| 106 | const destroyWindow = (window: BrowserWindow) => { |
| 107 | if (mainWindow === window) mainWindow = null; |
no outgoing calls
no test coverage detected