diff --git a/src/cards/top-languages-card.js b/src/cards/top-languages-card.js index 90f5a568..4e8ed3c5 100644 --- a/src/cards/top-languages-card.js +++ b/src/cards/top-languages-card.js @@ -17,6 +17,7 @@ const MIN_CARD_WIDTH = 280; const DEFAULT_LANG_COLOR = "#858585"; const CARD_PADDING = 25; const COMPACT_LAYOUT_BASE_HEIGHT = 90; +const MAXIMUM_LANGS_COUNT = 20; const NORMAL_LAYOUT_DEFAULT_LANGS_COUNT = 5; const COMPACT_LAYOUT_DEFAULT_LANGS_COUNT = 6; @@ -170,7 +171,7 @@ const donutCenterTranslation = (totalLangs) => { const trimTopLanguages = (topLangs, langs_count, hide) => { let langs = Object.values(topLangs); let langsToHide = {}; - let langsCount = clampValue(parseInt(langs_count), 1, 10); + let langsCount = clampValue(parseInt(langs_count), 1, MAXIMUM_LANGS_COUNT); // populate langsToHide map for quick lookup // while filtering out