Skip to content

Commit 9396aad

Browse files
committed
retry on failure for initializing app.
1 parent 80bd308 commit 9396aad

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "laravel-frontend-file-manager",
3-
"version": "3.0.79",
3+
"version": "3.0.80",
44
"description": "File manager for Laravel",
55
"keywords": [
66
"laravel",

src/store/actions.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ export default {
9292
}
9393
}
9494
else {
95-
window.location.reload();
95+
if(getters.callInitTill) {
96+
setTimeout(() => {
97+
window.location.reload();
98+
commit('increaseInitCallCount');
99+
}, 1000);
100+
}
96101
// Uncomment when needed.
97102
/*if(getters.callInitTill) {
98103
setTimeout(() => {
@@ -103,7 +108,12 @@ export default {
103108
// End of uncomment when needed.
104109
}
105110
}).catch(err => {
106-
window.location.reload();
111+
if(getters.callInitTill) {
112+
setTimeout(() => {
113+
window.location.reload();
114+
commit('increaseInitCallCount');
115+
}, 1000);
116+
}
107117
// Uncomment when needed.
108118
/*if(getters.callInitTill) {
109119
setTimeout(() => {

src/store/getters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ export default {
5151
* @returns {boolean}
5252
*/
5353
callInitTill(state) {
54-
return state.initCallCount < 3;
54+
return state.initCallCount < 2;
5555
}
5656
};

0 commit comments

Comments
 (0)