electron: lazily read updater enabled

This commit is contained in:
Brendan Allan
2026-03-19 21:47:47 +08:00
parent bd4527b4f2
commit cbf4b68fee
2 changed files with 3 additions and 3 deletions
@@ -152,12 +152,12 @@ const createPlatform = (): Platform => {
storage,
checkUpdate: async () => {
if (!UPDATER_ENABLED) return { updateAvailable: false }
if (!UPDATER_ENABLED()) return { updateAvailable: false }
return window.api.checkUpdate()
},
update: async () => {
if (!UPDATER_ENABLED) return
if (!UPDATER_ENABLED()) return
await window.api.installUpdate()
},