You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the user logged in, if the page reloads and uses static auth routes, then we get router is undefined error the page is not rendering because of no auth routes.
What is the expected result?
Replace the following import in src/store/modules/tab/index.ts
import { useRouter } from 'vue-router'; to import { router } from '@/router';
What is the actual result?
After replacing the router from 'vue-router' to '@/router' it is working fine, hence the behavior is same.
Logging (Optional)
No response
Additional Description (Optional)
No response
The text was updated successfully, but these errors were encountered:
I've created the modular structure for easy code management and reuse the modules, and I initialize the modules before the setupRouter in main.ts, during the module initialization I prepare the static routes which internally call tabStore.initHomeTab() which triggered the error router is undefined.
Changing import { useRouter } from 'vue-router'; to import { router } from '@/router'; in src/store/modules/tab/index.ts solves my problem. I created this ticket for users like me who customize may see such issues, and these notes may help them.
Software Version
v1.1.0
Operating Environment
Ubuntu
Operating Architecture
AMD64
Reproduce Steps
After the user logged in, if the page reloads and uses static auth routes, then we get router is undefined error the page is not rendering because of no auth routes.
What is the expected result?
Replace the following import in src/store/modules/tab/index.ts
import { useRouter } from 'vue-router'; to import { router } from '@/router';
What is the actual result?
After replacing the router from 'vue-router' to '@/router' it is working fine, hence the behavior is same.
Logging (Optional)
No response
Additional Description (Optional)
No response
The text was updated successfully, but these errors were encountered: