Touring-Vue-Router icon indicating copy to clipboard operation
Touring-Vue-Router copied to clipboard

L10-end not working

Open macimovic opened this issue 4 years ago • 1 comments

Hi, I am getting the following error inside the console when clicking on Events in navigation.

function beforeRouteEnter(routeTo, routeFrom, next) {
    nprogress__WEBPACK_IMPORTED_MODULE_3___default.a.start();
    _services_EventService_js__WEBPACK_IMPORTED_MODULE_2__["default"].getEvents(2, parseInt(routeTo.query.page) || 1).then(function (response) {
      console.log("inside then response handling");
      next(function (comp) {
        comp.events = response.data;
        comp.totalEvents = response.headers['x-total-count'];
      });
    }).catch(function () {
      next({
        name: 'NetworkError'
      });
    }).finally(function () {
      nprogress__WEBPACK_IMPORTED_MODULE_3___default.a.done();
    });
  }```
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.

macimovic avatar Dec 19 '21 09:12 macimovic

Might worth mentioning to anyone having a similar issue.

inside of package.json after changing inside of "dependencies"

"vue-router": "^4.0.4" to "vue-router": "^4.0.0" and running npm install again I got the example to work.

macimovic avatar Dec 19 '21 10:12 macimovic