mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-15 10:07:33 +02:00
refactor: ensure lodash is default-imported (#6716)
This commit is contained in:
parent
47c9a37c5f
commit
ea6ceaa371
44 changed files with 239 additions and 221 deletions
|
@ -5,7 +5,7 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import {mapValues} from 'lodash';
|
||||
import _ from 'lodash';
|
||||
import {normalizeUrl} from '@docusaurus/utils';
|
||||
import type {Sidebars} from './sidebars/types';
|
||||
import {createSidebarsUtils} from './sidebars/utils';
|
||||
|
@ -43,7 +43,7 @@ export function toGlobalSidebars(
|
|||
version: LoadedVersion,
|
||||
): Record<string, GlobalSidebar> {
|
||||
const {getFirstLink} = createSidebarsUtils(sidebars);
|
||||
return mapValues(sidebars, (sidebar, sidebarId) => {
|
||||
return _.mapValues(sidebars, (sidebar, sidebarId) => {
|
||||
const firstLink = getFirstLink(sidebarId);
|
||||
if (!firstLink) {
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue