fix: fixed sorting of languages by percentage
This commit is contained in:
parent
ad87824f3c
commit
8a8ff5b390
1 changed files with 6 additions and 4 deletions
|
@ -41,10 +41,12 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
// hide langs
|
// hide langs
|
||||||
langs = langs.filter((lang) => {
|
langs = langs
|
||||||
if (!hide_langs_below) return true;
|
.sort((a, b) => b.size - a.size)
|
||||||
return (lang.size / totalSize) * 100 > hide_langs_below;
|
.filter((lang) => {
|
||||||
});
|
if (!hide_langs_below) return true;
|
||||||
|
return (lang.size / totalSize) * 100 > hide_langs_below;
|
||||||
|
});
|
||||||
|
|
||||||
// returns theme based colors with proper overrides and defaults
|
// returns theme based colors with proper overrides and defaults
|
||||||
const { titleColor, textColor, bgColor } = getCardColors({
|
const { titleColor, textColor, bgColor } = getCardColors({
|
||||||
|
|
Loading…
Add table
Reference in a new issue