Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
226 views
in Technique[技术] by (71.8m points)

javascript - Navigation cancelled in console, what could be wrong?

When I logout from a page it calls a following error: (Uncaught (in promise) Error: Navigation cancelled from "/recenzije" to "/prijava" with a new navigation). Is this maybe because i have duplicated routes when user is not logged in or what? Here is my app.vue code (I think there is a problem because when I remove it the problem disappears):

if(currentRoute.meta.needsUser){
        router.push({name:'prijava'});
    }

And there is my logout function in a different vue (recenzije.vue):

signOut() {
        firebase.auth().signOut().then(() =>{
        this.$router.push({ name: 'prijava' })
        })
    },

Any help would be appreciated.

question from:https://stackoverflow.com/questions/66067328/navigation-cancelled-in-console-what-could-be-wrong

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...