|
@@ -10,6 +10,19 @@ import PrintRoutes from "./modules/print/routes/routes";
|
|
|
import ReportsRoutes from "./modules/reports/routes/routes";
|
|
|
import { CORE_API } from "@/constants/constants.js";
|
|
|
|
|
|
+// 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);
|
|
|
|
|
|
let router = new Router({
|