Skip to content

Commit

Permalink
fix: cache value to ensure scroll works
Browse files Browse the repository at this point in the history
  • Loading branch information
dyersituations committed Jun 18, 2024
1 parent 251c6ae commit 791403c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/Checkout/CheckoutPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -817,9 +817,12 @@ export default {
this.showUpsellModule = false;
},
guestCheckout() {
// Cache value to know whether to trigger nextTick
const wasCheckoutStickyExperimentShown = this.showCheckoutStickyExperiment;
this.checkingOutAsGuest = true;
if (this.showCheckoutStickyExperiment) {
if (wasCheckoutStickyExperimentShown) {
this.$nextTick(() => this.scrollToSection('#checkout-actions'));
}
},
Expand Down

0 comments on commit 791403c

Please sign in to comment.