Closed
Description
Reproduction
https://stackblitz.com/edit/github-ddb6tb?file=src/main.ts
Steps to reproduce the bug
- Install Pinia & Vue Router
- Add a
beforeEach
on the router instance that uses a store - Check console on startup
Expected behavior
No warnings appear
Actual behavior
Warning about injection symbol appears. See screenshot (the toRefs
warning appears unrelated):
Additional information
This is a minimal example of what we have already had running for a long time in production. Since upgrading to Vue 2.7 this warning has started to appear with no other code changes.
Workaround is adding an await nextTick()
in the start of the router guard which makes the error disappear.
Metadata
Metadata
Assignees
Labels
No labels