Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Mar 8, 2024
1 parent 052f490 commit 5e64950
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 7 additions & 6 deletions packages/docusaurus/src/server/plugins/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,17 +251,18 @@ export type LoadPluginsResult = {

type ContentLoadedResult = {routes: RouteConfig[]; globalData: GlobalData};

export function mergeGlobalData(...globalDatas: GlobalData[]): GlobalData {
export function mergeGlobalData(...globalDataList: GlobalData[]): GlobalData {
const result: GlobalData = {};

const allPluginIdentifiers: PluginIdentifier[] = globalDatas.flatMap((gd) =>
Object.keys(gd).flatMap((name) =>
Object.keys(gd[name]!).map((id) => ({name, id})),
),
const allPluginIdentifiers: PluginIdentifier[] = globalDataList.flatMap(
(gd) =>
Object.keys(gd).flatMap((name) =>
Object.keys(gd[name]!).map((id) => ({name, id})),
),
);

allPluginIdentifiers.forEach(({name, id}) => {
const allData = globalDatas
const allData = globalDataList
.map((gd) => gd?.[name]?.[id])
.filter((d) => typeof d !== 'undefined');
const mergedData =
Expand Down
1 change: 0 additions & 1 deletion project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Daishi
Datagit
datagit
Datagit's
Datas
dedup
devto
dingers
Expand Down

0 comments on commit 5e64950

Please sign in to comment.