Merge pull request #930 from Safelite/defect/CSR-1055
CSR-1055 | Make sure first saveSession call is not asynchronous
This commit is contained in:
commit
3b843757a4
2 changed files with 5 additions and 2 deletions
|
|
@ -111,6 +111,7 @@ import experimentMixin from "@/mixins/experiment-mixin";
|
|||
import { experimentSettings } from "@/constants/experiments";
|
||||
import vinPagesMixin from "@/mixins/vin-pages-mixin";
|
||||
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
||||
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
|
||||
|
||||
// Define Validation Rules
|
||||
defineRule("zip-required", required(errorMessages.SERVICE_ZIP_REQUIRED));
|
||||
|
|
@ -222,7 +223,9 @@ export default {
|
|||
} else if (this.$store.getters.order.referralNumber?.length === 6) {
|
||||
await this.navigateForwardWithSingleCarMatch();
|
||||
} else if (this.isRepair) {
|
||||
return this.$router.navigateWithSaving(
|
||||
// call saveSession here - navigateWithSaving only saves asynchronously
|
||||
await saveSession();
|
||||
return this.$router.navigateWithoutSaving(
|
||||
this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS,
|
||||
this.$route
|
||||
);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export default {
|
|||
async navigateForwardWithSingleCarMatch() {
|
||||
// If we have not already saved a session, we need to save one now before the lengthy call to getPartsOrQuestions
|
||||
if (!store.getters.applicationUser.savedSessionId) {
|
||||
saveSession();
|
||||
await saveSession();
|
||||
}
|
||||
|
||||
const result = await this.dispatchStoreAction(storeActions.GET_PARTS_OR_QUESTIONS);
|
||||
|
|
|
|||
Loading…
Reference in a new issue