Skip to content

Commit 31591a3

Browse files
Update packages/docusaurus/src/client/preload.ts
Co-authored-by: Sébastien Lorber <[email protected]>
1 parent 021158a commit 31591a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/docusaurus/src/client/preload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {matchRoutes} from 'react-router-config';
1717
* @returns Promise object represents whether pathname has been preloaded
1818
*/
1919
export default function preload(pathname: string): Promise<void[]> {
20-
const matches = [pathname, decodeURI(pathname)]
20+
const matches = Array.from(new Set([pathname, decodeURI(pathname)]))
2121
.map(p => matchRoutes(routes, p))
2222
.flat();
2323

0 commit comments

Comments
 (0)