fix: skip Tauri updater in Electron, add debug logging for routing

This commit is contained in:
2026-02-21 19:54:00 +11:00
parent 00ff6a6b72
commit 6a31ea64ed
4 changed files with 34 additions and 2 deletions

View File

@@ -42,11 +42,24 @@ if ('serviceWorker' in navigator) {
});
}
/**
* Check if we're running in Electron (not Tauri)
* Electron exposes window.electron in preload.js
*/
const isElectron = (): boolean => 'electron' in window;
/**
* Check for app updates using Tauri updater
* Prompts user if update is available and handles download/install
* Note: Electron has its own auto-updater in main.js, so skip for Electron
*/
async function checkForUpdates() {
// Skip if in Electron - Electron has its own auto-updater
if (isElectron()) {
console.log('Update check skipped - Electron handles updates natively');
return;
}
// Only run in Tauri context
if (!isTauri()) {
console.log('Update check skipped - not running in Tauri');