This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition with response attribute. Fixes #12.
There are two use cases as I see it. One is to fire off a series of requests and react to all of them. The other is to treat all responses but the response to the most recent request as stale (e.g. in a search app you only want to show results for the current search and ignore out of order responses) This change accomodates both use cases by firing events for every response ( which is unchanged), but setting up the response attribute to be either the response for the most resent request, or null. Likewise it exposes an error attribute that behaves the same way.
- Loading branch information
Showing
1 changed file
with
44 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters