mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-03 20:27:20 +02:00
Update packages/docusaurus/src/client/preload.ts
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
This commit is contained in:
parent
021158a02d
commit
31591a3877
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ import {matchRoutes} from 'react-router-config';
|
||||||
* @returns Promise object represents whether pathname has been preloaded
|
* @returns Promise object represents whether pathname has been preloaded
|
||||||
*/
|
*/
|
||||||
export default function preload(pathname: string): Promise<void[]> {
|
export default function preload(pathname: string): Promise<void[]> {
|
||||||
const matches = [pathname, decodeURI(pathname)]
|
const matches = Array.from(new Set([pathname, decodeURI(pathname)]))
|
||||||
.map(p => matchRoutes(routes, p))
|
.map(p => matchRoutes(routes, p))
|
||||||
.flat();
|
.flat();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue