Merge pull request #2555 from Safelite/feature/CASH-807
Potential fix for infinite loop?
This commit is contained in:
commit
5798e40751
1 changed files with 11 additions and 9 deletions
|
|
@ -1,17 +1,19 @@
|
|||
import analyticsMixin from "@/mixins/analytics-mixin";
|
||||
import { routeData } from "@/router/constants/routes";
|
||||
import router from "@/router";
|
||||
import store from "@/store";
|
||||
import { storeActions } from "@/constants/store-actions";
|
||||
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
|
||||
|
||||
export async function bailout(errorPayload, forceRestart = false) {
|
||||
if (forceRestart) {
|
||||
await store.dispatch(storeActions.RESET_STATE);
|
||||
deleteFunnelCookie();
|
||||
}
|
||||
|
||||
analyticsMixin.methods.pushPageErrorToDataLayer(errorPayload);
|
||||
|
||||
if (forceRestart) {
|
||||
router.push({
|
||||
name: routeData.RESTART.name,
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
name: routeData.ERROR.name,
|
||||
});
|
||||
}
|
||||
router.push({
|
||||
name: routeData.ERROR.name,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue