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

getFromCookies returns inconsistent value when not supported #318

Open
kyprous opened this issue Jun 28, 2016 · 0 comments
Open

getFromCookies returns inconsistent value when not supported #318

kyprous opened this issue Jun 28, 2016 · 0 comments

Comments

@kyprous
Copy link

kyprous commented Jun 28, 2016

This is something I came across when trying to use Local Storage which eventually fallbacks to also unsupported/blocked cookie storage.
Repro steps:

  • Call LocalStorageService.get('dummyKey')
  • Local Storage is not supported, so we fallback to cookie retrieval.
  • So this is executed: getFromCookies('dummyKey')
  • Cookies are not supported either.

Expected result: return null
Actual result: return false

So I guess this is debatable, but I would expect that if cookies are not supported, it would return the same value as if the cookie did not exist, which is null.

As of time of writing, getFromCookies is the method with this logic.

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

No branches or pull requests

1 participant