diff --git a/components/breadcrumb/Breadcrumb.jsx b/components/breadcrumb/Breadcrumb.jsx index 662d1ddf82..a17fcbeab6 100644 --- a/components/breadcrumb/Breadcrumb.jsx +++ b/components/breadcrumb/Breadcrumb.jsx @@ -5,8 +5,10 @@ const defaultNameRender = (breadcrumbName, route, params) => { if (!breadcrumbName) { return null; } + const paramsKeys = Object.keys(params).join('|'); const name = breadcrumbName.replace( - /:(.*)/g, (replacement, key) => params[key] || replacement + new RegExp(`:(${paramsKeys})`, 'g'), + (replacement, key) => params[key] || replacement ); return {name}; };