File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,13 @@ import About from '@/Landing/About.vue';
29
29
import Footer from ' @/Landing/Footer.vue' ;
30
30
import { usePersistanceService } from ' @/services' ;
31
31
import { downloadjs } from ' @/Settings/download' ;
32
+ import { onMounted } from ' vue' ;
32
33
33
34
const env = import .meta .env ;
34
35
const domain = env .VITE_MIGRATE_TO_DOMAIN ;
35
36
36
37
const persistanceService = usePersistanceService ();
38
+ onMounted (() => persistanceService .persist ())
37
39
const download = async () => {
38
40
const file = await persistanceService .stateToFile ();
39
41
downloadjs (file , file .name , file .type );
Original file line number Diff line number Diff line change @@ -68,10 +68,9 @@ class PersistanceService {
68
68
} ) ;
69
69
}
70
70
71
- public persist ( ) {
72
- this . loadState ( ) . then ( ( ) => {
73
- this . main . $subscribe ( ( ) => this . saveState ( ) , { deep : true } ) ;
74
- } ) ;
71
+ public async persist ( ) {
72
+ await this . loadState ( ) ;
73
+ this . main . $subscribe ( ( ) => this . saveState ( ) , { deep : true } ) ;
75
74
}
76
75
77
76
public resetStateToDefault ( ) {
You can’t perform that action at this time.
0 commit comments