added fix for url encoded paths (#20813)

fixes: #20782
This commit is contained in:
Erik Jan de Wit 2023-06-12 12:51:19 +02:00 committed by GitHub
parent 911663b65c
commit e750ad71de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,9 @@ export const RoutableTabs = ({
.map((child) => child.props.eventKey.toString());
// Determine if there is an exact match.
const exactMatch = eventKeys.find((eventKey) => eventKey === pathname);
const exactMatch = eventKeys.find(
(eventKey) => eventKey === decodeURI(pathname)
);
// Determine which event keys at least partially match the current path, then sort them so the nearest match ends up on top.
const nearestMatch = eventKeys