fix: tabbar build failed

This commit is contained in:
chenjiahan 2021-02-11 13:13:02 +08:00
parent e2e0f66fe6
commit 4f612f3f23

View File

@ -45,7 +45,7 @@ export default createComponent({
const { $route } = vm;
const { to } = props;
const config = isObject(to) ? to : { path: to };
const pathMatched = config.path === $route.path;
const pathMatched = 'path' in config && config.path === $route.path;
const nameMatched = 'name' in config && config.name === $route.name;
return pathMatched || nameMatched;