Merge pull request #2555 from Safelite/feature/CASH-807

Potential fix for infinite loop?
This commit is contained in:
chloeherdsafelite 2025-05-27 12:15:31 -04:00 committed by GitHub
commit 5798e40751
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,
});
}