From 55a3cecd4999989dcc3e0dc5a30d03e2293e3814 Mon Sep 17 00:00:00 2001 From: Zohan Subhash Date: Tue, 17 Jan 2023 16:07:42 +0530 Subject: [PATCH] Update repo-card.js --- src/cards/repo-card.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/cards/repo-card.js b/src/cards/repo-card.js index e32a8d02..7079073c 100644 --- a/src/cards/repo-card.js +++ b/src/cards/repo-card.js @@ -123,20 +123,18 @@ const renderRepoCard = (repo, options = {}) => { isTemplate, starCount, forkCount, - highlight, } = repo; - if (!highlight) { - highlight = isTemplate + const highlight = repo.highlight + ? // @ts-ignore + getBadgeSVG(repo.highlight) + : isTemplate ? // @ts-ignore getBadgeSVG(i18n.t("repocard.template"), colors.textColor) : isArchived ? // @ts-ignore getBadgeSVG(i18n.t("repocard.archived"), colors.textColor) : "" - } else { - highlight = getBadgeSVG(highlight); - } const lineHeight = 10; const header = show_owner ? nameWithOwner : name;