This commit is contained in:
uh wot 2021-08-19 16:49:56 +02:00
parent 48a079858a
commit 87d41408c6
Signed by: uhwot
GPG Key ID: CB2454984587B781
2 changed files with 5 additions and 5 deletions

4
dist/worker.js vendored

File diff suppressed because one or more lines are too long

View File

@ -42,11 +42,11 @@ async function handler(type, request) {
} else {
format = format.toLowerCase()
if (format_string_to_num[format] === undefined) {
html = Object.values(format_string_to_num).indexOf(format)
if (html === -1) {
index = Object.values(format_string_to_num).indexOf(format)
if (index === -1) {
return new Response('Invalid format', { status: 400, headers: { 'content-type': 'text/plain' } })
}
format = Object.keys(format_string_to_num)[html]
format = Object.keys(format_string_to_num)[index]
}
}