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

Await on getEntitlements in getAvailableIntervention #3526

Merged
merged 3 commits into from
May 29, 2024

Conversation

mhkawano
Copy link
Contributor

@mhkawano mhkawano commented May 29, 2024

We have a race condition between start and getAvailableInterventions where start will not necessarily call getEntitlements before it's needed by getAvailableInterventions. This change removes the need to call start by having getAvailableInterventions make its own call.

This will not duplicate the network call, as the entitlements manager will keep one promise until reset has been called. Additionally start will not even make a getEntitlements call on unlocked content, so we need to remove our dependency on it either way.

Tested manually on the enterprise-funnel.html and enterprise-funnel-manual.html pages.

@mhkawano mhkawano marked this pull request as draft May 29, 2024 21:02
@mhkawano mhkawano marked this pull request as ready for review May 29, 2024 21:02
@mhkawano mhkawano closed this May 29, 2024
@mhkawano mhkawano reopened this May 29, 2024
@mhkawano mhkawano merged commit e25e3c2 into subscriptions-project:main May 29, 2024
14 checks passed
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.

2 participants