Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECP-9049] Fix fetching redeemed gift cards on cart load #496

Merged
merged 1 commit into from
May 17, 2024

Conversation

candemiralp
Copy link
Member

Summary

init method of cart.plugin.js fetches redeemed giftcards on DOMContentLoaded event. However, under some circumstances, document.readyState is set to interacting before loading this JS file. Therefore, DOMContentLoaded is not triggered since the state has already been transitioned into the next one.

This fix adds a logic to check document.readyState while fetching gift cards.

Tested scenarios

  • Gift card payments

@candemiralp candemiralp requested a review from a team as a code owner May 17, 2024 08:40
Copy link

sonarcloud bot commented May 17, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@candemiralp candemiralp merged commit 61832f1 into prepare-v4 May 17, 2024
6 checks passed
@candemiralp candemiralp deleted the ECP-9049 branch May 17, 2024 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants