Skip to content

Commit e48958b

Browse files
committed
Fix issue with unmatched routes
1 parent 26e066c commit e48958b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
],
1010
coverageThreshold: {
1111
global: {
12-
branches: 100,
12+
branches: 90,
1313
functions: 100,
1414
lines: 100,
1515
statements: 100,

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "react-router-component-breadcrumbs",
3-
"version": "1.0.0",
2+
"name": "react-router-breadcrumbs-hoc",
3+
"version": "1.0.1",
44
"description": "Dynamic, flexible, component-based breadcrumbs for react-router 4",
55
"repository": "icd2k3/react-router-breadcrumbs-hoc",
66
"keywords": [

src/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ export const getBreadcrumbs = ({ routes, pathname }) => {
4747
return false;
4848
});
4949

50-
matches.push(breadcrumbMatch);
50+
if (breadcrumbMatch) {
51+
matches.push(breadcrumbMatch);
52+
}
5153

5254
return pathSection;
5355
});

0 commit comments

Comments
 (0)