Commit 7d992bc5 authored by anton's avatar anton

Better check for undefined in waitForStore

parent c53fcd10
......@@ -24,7 +24,7 @@ const Router = new VueRouter({
Router.beforeEach((to, from, next) => {
const waitForStore = (app, cb) => {
if (app.$store === undefined) setTimeout(() => waitForStore(app, cb), 0)
if (typeof app.$store === 'undefined') setTimeout(() => waitForStore(app, cb), 0)
else cb()
}
waitForStore(Router.app, () => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment