mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-04-22 10:42:08 +00:00
fix: fixed sorting of languages by percentage
This commit is contained in:
parent
ad87824f3c
commit
8a8ff5b390
@ -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…
x
Reference in New Issue
Block a user