Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Ensure that only the latest promise updates the autocompleter state #7318
Multiple promises can be resolving when using an autocompleter, and network conditions can determine which one actually gets to update the state. We only want the most recently created promise to update the state.
This keeps track of the most recent (or, active) promise, and only processes the result if the promise is still the most recent one.
How has this been tested?
I followed the following:
The list of users updated correctly, and slow API requests didn't end up interfering with each other.
Types of changes