How to Solve Vue Error: NavigationDuplicated

1. Error information

This error report does not affect the function. If you feel uncomfortable, you can solve it

2. Solutions

Add the following sentences in main. JS


import Router from 'vue-router'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

Done!

 

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *