Refactor: Top langs card: Use default value instead if statement (#3082)

This commit is contained in:
Alexandr Garbuzov 2023-08-15 10:30:06 +03:00 committed by GitHub
parent da82999f06
commit 4eefd2497d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -719,7 +719,7 @@ const getDefaultLanguagesCountByLayout = ({ layout, hide_progress }) => {
const renderTopLanguages = (topLangs, options = {}) => {
const {
hide_title = false,
hide_border,
hide_border = false,
card_width,
title_color,
text_color,
@ -808,9 +808,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
if (disable_animations) card.disableAnimations();
if (hide_border) {
card.setHideBorder(hide_border);
}
card.setHideBorder(hide_border);
card.setHideTitle(hide_title);
card.setCSS(
`