Skip to content

Commit

Permalink
fix: update version toast
Browse files Browse the repository at this point in the history
close #1450
  • Loading branch information
hyoban committed Nov 8, 2024
1 parent a5e3e02 commit 25e7cea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/renderer/src/initialize/migrates/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ declare global {
export const doMigration = async () => {
const lastVersion = localStorage.getItem(appVersionKey)
if (!lastVersion || lastVersion === APP_VERSION) {
localStorage.setItem(appVersionKey, APP_VERSION)
if (!lastVersion) {
localStorage.setItem(appVersionKey, APP_VERSION)
}
return
}
// NOTE: Add migration logic here

appLog(`Upgrade from ${lastVersion} to ${APP_VERSION}`)
window.__app_is_upgraded__ = true
localStorage.setItem(appVersionKey, APP_VERSION)
}

0 comments on commit 25e7cea

Please sign in to comment.