Fix auto-update condition and bump build version to 25.12.26; update app version to 2.15.0

This commit is contained in:
Nayam Amarshe
2024-12-25 22:15:10 +05:30
parent 5100d8df6a
commit f7f53ae5e5
3 changed files with 7 additions and 3 deletions

View File

@@ -57,7 +57,11 @@ const createMainWindow = () => {
mainWindow.webContents
.executeJavaScript('localStorage.getItem("autoUpdate");', true)
.then((lastSaved: string | null) => {
if (lastSaved !== null && lastSaved === "true") {
if (
lastSaved === null ||
lastSaved === undefined ||
lastSaved === "true"
) {
autoUpdater.checkForUpdates();
} else {
console.log("🚀 Auto Update is disabled");