diff --git a/packages/docusaurus/src/server/plugins/plugins.ts b/packages/docusaurus/src/server/plugins/plugins.ts index 276e354cfe05..3fa102ef90c8 100644 --- a/packages/docusaurus/src/server/plugins/plugins.ts +++ b/packages/docusaurus/src/server/plugins/plugins.ts @@ -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 = diff --git a/project-words.txt b/project-words.txt index 00cc78861877..b570a80a8e57 100644 --- a/project-words.txt +++ b/project-words.txt @@ -66,7 +66,6 @@ Daishi Datagit datagit Datagit's -Datas dedup devto dingers