kopia lustrzana https://github.com/badgen/badgen.net
fix: check if icon is undefined before trying to set it
rodzic
958ab2af7c
commit
2615fb8ef3
|
@ -69,8 +69,9 @@ export function badgenServe (handlers: BadgenServeHandlers): Function {
|
|||
params.subject = simpleDecode(params.subject)
|
||||
params.status = simpleDecode(params.status)
|
||||
|
||||
// @ts-ignore
|
||||
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