@@ -20,7 +20,7 @@ import toArray from './to-array.js'
2020// 1. When `?logo=` contains a simple-icons logo or contains a base64-encoded
2121// SVG, that logo is used. When a `&logoColor=` is specified, that color is
2222// used (except for the base64-encoded logos). Otherwise the default color
23- // is used. The appearance of the logo can be customized using `logoWidth`,
23+ // is used.
2424// When `?logo=` is specified, any logo-related parameters specified
2525// dynamically by the service, or by default in the service, are ignored.
2626// 2. The second precedence is the dynamic logo returned by a service. This is
@@ -52,11 +52,7 @@ export default function coalesceBadge(
5252 colorB : legacyOverrideColor ,
5353 colorA : legacyOverrideLabelColor ,
5454 } = overrides
55- let {
56- logoWidth : overrideLogoWidth ,
57- color : overrideColor ,
58- labelColor : overrideLabelColor ,
59- } = overrides
55+ let { color : overrideColor , labelColor : overrideLabelColor } = overrides
6056
6157 // Only use the legacy properties if the new ones are not provided
6258 if ( typeof overrideColor === 'undefined' ) {
@@ -73,7 +69,6 @@ export default function coalesceBadge(
7369 if ( typeof overrideLabelColor === 'number' ) {
7470 overrideLabelColor = `${ overrideLabelColor } `
7571 }
76- overrideLogoWidth = + overrideLogoWidth || undefined
7772
7873 const {
7974 isError,
@@ -85,7 +80,6 @@ export default function coalesceBadge(
8580 namedLogo : serviceNamedLogo ,
8681 logoColor : serviceLogoColor ,
8782 logoSize : serviceLogoSize ,
88- logoWidth : serviceLogoWidth ,
8983 link : serviceLink ,
9084 cacheSeconds : serviceCacheSeconds ,
9185 style : serviceStyle ,
@@ -131,7 +125,6 @@ export default function coalesceBadge(
131125 // If the logo has been overridden it does not make sense to inherit the
132126 // original width or position.
133127 logoSize = overrideLogoSize
134- logoWidth = overrideLogoWidth
135128 } else {
136129 if ( serviceLogoSvg ) {
137130 logoSvgBase64 = svg2base64 ( serviceLogoSvg )
@@ -143,12 +136,11 @@ export default function coalesceBadge(
143136 namedLogoColor = coalesce ( overrideLogoColor , serviceLogoColor )
144137 }
145138 logoSize = coalesce ( overrideLogoSize , serviceLogoSize )
146- logoWidth = coalesce ( overrideLogoWidth , serviceLogoWidth )
147139 }
148140 if ( namedLogo ) {
149141 const iconSize = getIconSize ( String ( namedLogo ) . toLowerCase ( ) )
150142
151- if ( ! logoWidth && iconSize && logoSize === 'auto' ) {
143+ if ( iconSize && logoSize === 'auto' ) {
152144 logoWidth = ( iconSize . width / iconSize . height ) * DEFAULT_LOGO_HEIGHT
153145 }
154146
0 commit comments