kopia lustrzana https://github.com/badgen/badgen.net
fix: ignore ParsedUrlQuery modification for serve (#300)
* fix: ignore ParsedUrlQuery modification for serve * fix: check if icon is undefined before trying to set itpull/302/head
commit
944b7fc868
|
@ -69,7 +69,9 @@ export function badgenServe (handlers: BadgenServeHandlers): Function {
|
|||
params.subject = simpleDecode(params.subject)
|
||||
params.status = simpleDecode(params.status)
|
||||
|
||||
query.icon = icon === '' ? params.subject : icon
|
||||
if (icon !== undefined) {
|
||||
query.icon = icon === '' ? params.subject : icon
|
||||
}
|
||||
|
||||
if (query.style === undefined) {
|
||||
const host = req.headers['x-forwarded-host'] || req.headers.host
|
||||
|
|
Ładowanie…
Reference in New Issue