Refactor: Fixed vscode type error in renderTopLanguages function (#2964)

This commit is contained in:
Alexandr Garbuzov
2023-07-23 13:23:14 +03:00
committed by GitHub
parent 65ad198d62
commit 82917825f9
+7 -5
View File
@@ -738,11 +738,13 @@ const renderTopLanguages = (topLangs, options = {}) => {
hide,
);
let width = isNaN(card_width)
? DEFAULT_CARD_WIDTH
: card_width < MIN_CARD_WIDTH
? MIN_CARD_WIDTH
: card_width;
let width = card_width
? isNaN(card_width)
? DEFAULT_CARD_WIDTH
: card_width < MIN_CARD_WIDTH
? MIN_CARD_WIDTH
: card_width
: DEFAULT_CARD_WIDTH;
let height = calculateNormalLayoutHeight(langs.length);
// returns theme based colors with proper overrides and defaults