Merge pull request #821 from Safelite/defect/digital/fix-entry-page-save-session-call

Fix extra save session call from entry page causing invalid referral num
This commit is contained in:
Josh Dassinger 2024-08-14 12:24:11 -05:00 committed by GitHub
commit 8eea7c3628
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -172,7 +172,7 @@ router.afterEach(async (to, from) => {
}
const skipSaveSession = !!router.options.history.state[routerParams.SKIP_SAVE_SESSION];
if (!skipSaveSession && !store.hasSubmittedOrder()) {
if (from.name !== undefined && !skipSaveSession && !store.hasSubmittedOrder()) {
await saveSession({});
}