Skip to content

Commit

Permalink
修复一个BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
easonyq committed May 16, 2018
1 parent 06765f3 commit 30ac3a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/lavas-core-vue/core/route-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ export default class RouteManager {
}

// find route in config
let routeConfig = routesConfig.find(function ({pattern}) {
let routeConfigArr = routesConfig.filter(function ({pattern}) {
return pattern instanceof RegExp
? pattern.test(route.fullPath) : pattern === route.fullPath;
});

// mixin with config, rewrites path, add lazyLoading, meta
if (routeConfig) {
routeConfigArr.forEach(routeConfig => {
let {
path: routePath,
lazyLoading,
Expand All @@ -115,7 +115,7 @@ export default class RouteManager {
rewritePath: routePath || route.rewritePath,
lazyLoading: lazyLoading || !!chunkname
});
}
});

/**
* generate hash for each route which will be used in routes.js template,
Expand Down

0 comments on commit 30ac3a5

Please sign in to comment.