diff --git a/lib/logos.js b/lib/logos.js index 813b4cf3675ff..fbf3f76eeb9ca 100644 --- a/lib/logos.js +++ b/lib/logos.js @@ -93,10 +93,13 @@ function getSimpleIcon({ name, color, style, size }) { if (size === 'auto') { const { width: iconWidth, height: iconHeight } = getIconSize(key) - if (iconWidth > iconHeight) { + if (iconWidth !== iconHeight) { const path = resetIconPosition(simpleIcons[key].path) iconSvg = iconSvg - .replace('viewBox="0 0 24 24"', `viewBox="0 0 24 ${iconHeight}"`) + .replace( + 'viewBox="0 0 24 24"', + `viewBox="0 0 ${iconWidth} ${iconHeight}"`, + ) .replace(//, ``) } }