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

Unexpected window.localStorage use in user module actions #2735

Closed
2 of 5 tasks
Zulcom opened this issue Apr 15, 2019 · 1 comment
Closed
2 of 5 tasks

Unexpected window.localStorage use in user module actions #2735

Zulcom opened this issue Apr 15, 2019 · 1 comment
Labels
bug Bug reports

Comments

@Zulcom
Copy link
Contributor

Zulcom commented Apr 15, 2019

Current behavior

https://github.com/DivanteLtd/vue-storefront/blob/6a81be54dc088654b717d0cc624a90acf487a489/core/modules/user/store/actions.ts#L17-L23

Expected behavior

Don't break abstraction level, use Vue.prototype.$db.usersCollection

Steps to reproduce the issue

  1. Set default driver for user storage as INDEXEDDB
  2. Set breakpoint to referenced code line
  3. Make user register action
  4. See how action tries to get current-user from localStorage instead of expected INDEXEDDB

Can you handle fixing this bug by yourself?

  • YES
  • NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
  • This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
  • This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Environment details

  • Browser: Opera 60
  • OS: Windows 10 x64
  • Node: 10.15.3
  • Code Version: develop c5d6e8a
@Zulcom Zulcom added the bug Bug reports label Apr 15, 2019
@pkarw
Copy link
Collaborator

pkarw commented Apr 15, 2019

Thanks! In fact It should be changed @vue-kacper - we should stick with storage.ts cache management @patzick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports
Projects
None yet
Development

No branches or pull requests

2 participants