fix: check if icon is undefined before trying to set it

pull/300/head
Brian Faust 2019-07-18 10:01:37 +03:00 zatwierdzone przez GitHub
rodzic 958ab2af7c
commit 2615fb8ef3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -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