This repository has been archived by the owner on Jul 8, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure consistent behavior for duplicate cookies
In the case of two (or more) cookies with the same name visible to the current scope, so far we've been retrieving the first one we find for `getCookie()`, but the last one for `getCookies()` (because in the latter case we continued the loop and eventually overwrote a duplicate cookie name in the returned result/object). This change makes the behavior at least consistent, so there aren't different cookies in the result for both calls. Changing the api to include both cookies in the result seems reasonable. For context: js-cookie#813
- Loading branch information