Fix broken chained catch in Promises
This commit is contained in:
parent
530184a817
commit
bb926abbc4
@ -29,7 +29,10 @@ export function fetchReports({ commit }) {
|
|||||||
commit(STORE_REPORTS, { reports });
|
commit(STORE_REPORTS, { reports });
|
||||||
commit(IS_DONE_LOADING);
|
commit(IS_DONE_LOADING);
|
||||||
})
|
})
|
||||||
.catch(() => commit(IS_DONE_LOADING));
|
.catch((exc) => {
|
||||||
|
commit(IS_DONE_LOADING);
|
||||||
|
throw exc;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function downvote({ commit }, { id }) {
|
export function downvote({ commit }, { id }) {
|
||||||
@ -53,7 +56,10 @@ export function saveReport({ commit }, { type, lat, lng }) {
|
|||||||
commit(PUSH_REPORT, { report });
|
commit(PUSH_REPORT, { report });
|
||||||
commit(IS_DONE_LOADING);
|
commit(IS_DONE_LOADING);
|
||||||
})
|
})
|
||||||
.catch(() => commit(IS_DONE_LOADING));
|
.catch((exc) => {
|
||||||
|
commit(IS_DONE_LOADING);
|
||||||
|
throw exc;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function saveUnsentReport({ commit }, { report }) {
|
export function saveUnsentReport({ commit }, { report }) {
|
||||||
|
@ -243,7 +243,7 @@ export default {
|
|||||||
this.$store.state.location.error = 1;
|
this.$store.state.location.error = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$store.dispatch('fetchReports');
|
this.$store.dispatch('fetchReports').catch(() => {});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -67,7 +67,7 @@ export default {
|
|||||||
goToMap() {
|
goToMap() {
|
||||||
// Eventually vibrate, to ensure permission is prompted before driving
|
// Eventually vibrate, to ensure permission is prompted before driving
|
||||||
if (this.$store.state.settings.hasVibratePermission && navigator.vibrate) {
|
if (this.$store.state.settings.hasVibratePermission && navigator.vibrate) {
|
||||||
navigator.vibrate(1);
|
navigator.vibrate(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.$store.state.settings.skipOnboarding) {
|
if (!this.$store.state.settings.skipOnboarding) {
|
||||||
|
Loading…
Reference in New Issue
Block a user