Skip to content

Commit 25e7cea

Browse files
committed
fix: update version toast
close #1450
1 parent a5e3e02 commit 25e7cea

File tree

1 file changed

+4
-1
lines changed
  • apps/renderer/src/initialize/migrates

1 file changed

+4
-1
lines changed

apps/renderer/src/initialize/migrates/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ declare global {
1313
export const doMigration = async () => {
1414
const lastVersion = localStorage.getItem(appVersionKey)
1515
if (!lastVersion || lastVersion === APP_VERSION) {
16-
localStorage.setItem(appVersionKey, APP_VERSION)
16+
if (!lastVersion) {
17+
localStorage.setItem(appVersionKey, APP_VERSION)
18+
}
1719
return
1820
}
1921
// NOTE: Add migration logic here
2022

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

0 commit comments

Comments
 (0)