mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-26 01:33:02 +00:00
prettier
This commit is contained in:
parent
31591a3877
commit
98957bbeaf
|
|
@ -18,7 +18,7 @@ import {matchRoutes} from 'react-router-config';
|
|||
*/
|
||||
export default function preload(pathname: string): Promise<void[]> {
|
||||
const matches = Array.from(new Set([pathname, decodeURI(pathname)]))
|
||||
.map(p => matchRoutes(routes, p))
|
||||
.map((p) => matchRoutes(routes, p))
|
||||
.flat();
|
||||
|
||||
return Promise.all(matches.map((match) => match.route.component.preload?.()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue