From 4f612f3f230027bab6f3aecf7d075f1e88b45760 Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Thu, 11 Feb 2021 13:13:02 +0800 Subject: [PATCH] fix: tabbar build failed --- src/tabbar-item/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tabbar-item/index.tsx b/src/tabbar-item/index.tsx index 1c147ab55..11aa73fd6 100644 --- a/src/tabbar-item/index.tsx +++ b/src/tabbar-item/index.tsx @@ -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;