mirror of
https://github.com/anuraghazra/github-readme-stats.git
synced 2025-02-23 14:50:33 +08:00
Refactor: Resolve vscode type error in renderStatsCard function card width calc (#2984)
This commit is contained in:
parent
b6d5835441
commit
833324fc0d
@ -294,7 +294,11 @@ const renderStatsCard = (stats, options = {}) => {
|
||||
: statItems.length
|
||||
? RANK_CARD_DEFAULT_WIDTH
|
||||
: RANK_ONLY_CARD_DEFAULT_WIDTH) + iconWidth;
|
||||
let width = isNaN(card_width) ? defaultCardWidth : card_width;
|
||||
let width = card_width
|
||||
? isNaN(card_width)
|
||||
? defaultCardWidth
|
||||
: card_width
|
||||
: defaultCardWidth;
|
||||
if (width < minCardWidth) {
|
||||
width = minCardWidth;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user