kopia lustrzana https://github.com/badgen/badgen.net
Resolve iconPromise to undefined by default (#291)
Resolve iconPromise to undefined by defaultpull/295/head
commit
88d8dd826c
|
@ -46,7 +46,7 @@ export function badgenServe (handlers: BadgenServeHandlers): Function {
|
|||
try {
|
||||
const paramsPromise = handlers[matchedScheme](matchedArgs)
|
||||
|
||||
let iconPromise
|
||||
let iconPromise: Promise<string | undefined> = Promise.resolve(undefined);
|
||||
if (typeof query.icon === 'string') {
|
||||
if (query.icon === '') {
|
||||
iconPromise = Promise.resolve(defaultLabel)
|
||||
|
|
Ładowanie…
Reference in New Issue