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

🐛 Fix amp-list race condition #25964

Merged
merged 10 commits into from
Jan 3, 2020

Conversation

samouri
Copy link
Member

@samouri samouri commented Dec 10, 2019

summary
Addresses #25961

Adds a check that the src has not changed while the xhr was inflight. If the src has changed, then bail instead of scheduling a render. I've added a test that previously would have resulted in two renders and now instead only has one.

cc @jridgewell / @choumx

@samouri
Copy link
Member Author

samouri commented Dec 16, 2019

@choumx / @jridgewell: 🏓

@dreamofabear dreamofabear merged commit 8f679ea into ampproject:master Jan 3, 2020
@samouri samouri deleted the fix-amp-list-race branch January 3, 2020 18:58
sparhami pushed a commit to sparhami/amphtml that referenced this pull request Jan 3, 2020
* amp-list: bail out of rendering updates if the src has changed in the meantime

* Add test

* add test

* more specific test

* remove only

* no need to return promise (jridgewell)

* cleaner test case with a more explicit wait

* remove Promise again

* whitespace

* lint
@samouri samouri mentioned this pull request Mar 23, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants