|
@@ -4,6 +4,19 @@ import Vue from "vue";
|
|
import Router from "vue-router";
|
|
import Router from "vue-router";
|
|
import Home from "../views/Home.vue";
|
|
import Home from "../views/Home.vue";
|
|
|
|
|
|
|
|
+// ignore NavigationDuplicated. https://github.com/vuejs/vue-router/issues/2881
|
|
|
|
+const originalPush = Router.prototype.push;
|
|
|
|
+Router.prototype.push = function push(location, onResolve, onReject) {
|
|
|
|
+ if (onResolve || onReject)
|
|
|
|
+ return originalPush.call(this, location, onResolve, onReject);
|
|
|
|
+ try {
|
|
|
|
+ return originalPush.call(this, location).catch(err => err);
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+// end ignore
|
|
|
|
+
|
|
Vue.use(Router);
|
|
Vue.use(Router);
|
|
|
|
|
|
// function propsValidator(route, component) {
|
|
// function propsValidator(route, component) {
|