mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 17:17:28 +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 {sortBy} from 'lodash';
|
||||
import _ from 'lodash';
|
||||
import type {Palette} from 'node-vibrant/lib/color';
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,7 @@ const toPalette = (swatch: Palette): string[] => {
|
|||
}
|
||||
return result;
|
||||
}, [] as {popularity: number; hex: string}[]);
|
||||
palette = sortBy(palette, ['popularity']);
|
||||
palette = _.sortBy(palette, ['popularity']);
|
||||
return palette.map((color) => color.hex).reverse();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue