@@ -15,7 +15,8 @@ export default {
1515 // Mohammad Ashrafuddin Ferdousi : 2
1616 initializeApp ( { state, commit, getters, dispatch } ) {
1717 // Mohammad Ashrafuddin Ferdousi : 1
18- GET . initialize ( ) . then ( ( response ) => {
18+ let init = GET . initialize ( ) ;
19+ init . then ( ( response ) => {
1920 if ( response . data . result . status === 'success' ) {
2021 commit ( 'settings/initSettings' , response . data . config ) ;
2122 commit ( 'setDisks' , response . data . config . disks ) ;
@@ -89,11 +90,28 @@ export default {
8990 }
9091 } ) ;
9192 }
92- } else {
93+ }
94+ else {
9395 window . location . reload ( ) ;
96+ // Uncomment when needed.
97+ /*if(getters.callInitTill) {
98+ setTimeout(() => {
99+ dispatch('initializeApp');
100+ commit('increaseInitCallCount');
101+ }, 1000);
102+ }*/
103+ // End of uncomment when needed.
94104 }
95105 } ) . catch ( err => {
96106 window . location . reload ( ) ;
107+ // Uncomment when needed.
108+ /*if(getters.callInitTill) {
109+ setTimeout(() => {
110+ dispatch('initializeApp');
111+ commit('increaseInitCallCount');
112+ }, 1000);
113+ }*/
114+ // End of uncomment when needed.
97115 } ) ;
98116 } ,
99117
0 commit comments