mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-08-13 06:23:32 +00:00
fix: bug where wakatime api returns undefined languages (#1403)
Co-authored-by: Markus Tyrkkö <markus.tyrkko@nitor.com>
This commit is contained in:
co-authored by
Markus Tyrkkö
parent
bc6c22ea17
commit
28fa0b8877
@@ -123,7 +123,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
} = options;
|
||||
|
||||
const shouldHideLangs = Array.isArray(hide) && hide.length > 0;
|
||||
if (shouldHideLangs) {
|
||||
if (shouldHideLangs && languages !== undefined) {
|
||||
const languagesToHide = new Set(hide.map((lang) => lowercaseTrim(lang)));
|
||||
languages = languages.filter(
|
||||
(lang) => !languagesToHide.has(lowercaseTrim(lang.name)),
|
||||
@@ -138,7 +138,7 @@ const renderWakatimeCard = (stats = {}, options = { hide: [] }) => {
|
||||
|
||||
const lheight = parseInt(line_height, 10);
|
||||
|
||||
langsCount = clampValue(parseInt(langs_count), 1, langs_count);
|
||||
const langsCount = clampValue(parseInt(langs_count), 1, langs_count);
|
||||
|
||||
// returns theme based colors with proper overrides and defaults
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user