Skip to content

Commit

Permalink
fix bread route has no matching lang
Browse files Browse the repository at this point in the history
  • Loading branch information
luckcoding committed Dec 13, 2018
1 parent d03787a commit 285f06d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Layout/Bread.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Breadcrumb, Icon } from 'antd'
import Link from 'umi/navlink'
import withRouter from 'umi/withRouter'
import { withI18n } from '@lingui/react'
import { pathMatchRegexp, queryAncestors } from 'utils'
import { pathMatchRegexp, queryAncestors, addLangPrefix } from 'utils'
import styles from './Bread.less'

@withI18n()
Expand All @@ -24,7 +24,7 @@ class Bread extends PureComponent {
return (
<Breadcrumb.Item key={key}>
{paths.length - 1 !== key ? (
<Link to={item.route || '#'}>{content}</Link>
<Link to={addLangPrefix(item.route) || '#'}>{content}</Link>
) : (
content
)}
Expand Down

0 comments on commit 285f06d

Please sign in to comment.