()
| 102 | const PRELOAD_PATH = fileURLToPath(new URL("../preload/index.js", import.meta.url)); |
| 103 | |
| 104 | const liveMainWindow = (): BrowserWindow | null => { |
| 105 | const window = mainWindow; |
| 106 | if (!window) return null; |
| 107 | if (window.isDestroyed()) { |
| 108 | mainWindow = null; |
| 109 | return null; |
| 110 | } |
| 111 | return window; |
| 112 | }; |
| 113 | |
| 114 | const destroyWindow = (window: BrowserWindow) => { |
| 115 | if (mainWindow === window) mainWindow = null; |
no outgoing calls
no test coverage detected