File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
apps/renderer/src/initialize/migrates Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,15 @@ declare global {
11
11
}
12
12
13
13
export const doMigration = async ( ) => {
14
- const lastVersion = localStorage . getItem ( appVersionKey )
15
- if ( ! lastVersion || lastVersion === APP_VERSION ) {
16
- if ( ! lastVersion ) {
17
- localStorage . setItem ( appVersionKey , APP_VERSION )
18
- }
19
- return
20
- }
14
+ const lastVersion = localStorage . getItem ( appVersionKey ) || APP_VERSION
15
+ localStorage . setItem ( appVersionKey , APP_VERSION )
16
+
17
+ if ( lastVersion === APP_VERSION ) return
18
+
21
19
// NOTE: Add migration logic here
22
20
23
21
if ( ! APP_VERSION . includes ( "nightly" ) ) {
24
22
window . __app_is_upgraded__ = true
25
23
}
26
24
appLog ( `Upgrade from ${ lastVersion } to ${ APP_VERSION } ` )
27
-
28
- localStorage . setItem ( appVersionKey , APP_VERSION )
29
25
}
You can’t perform that action at this time.
0 commit comments