Explorar el Código

feat:eslint语法报错修复

yangfeng hace 1 año
padre
commit
a534cfefab
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      jydocs-mobile/src/router/index.ts

+ 3 - 3
jydocs-mobile/src/router/index.ts

@@ -8,9 +8,9 @@ if (process.env.NODE_DEV !== 'production') {
   Vue.use(VueRouter)
 }
 
-const originalReplace = VueRouter.prototype.replace
-VueRouter.prototype.replace = function replace(location) {
-  return originalReplace.call(this, location).catch(err => err)
+const originalReplace: any = VueRouter.prototype.replace
+VueRouter.prototype.replace = function replace (location) {
+  return originalReplace.call(this, location).catch((error: any) => error)
 }
 
 let routes = [