chore: js format

This commit is contained in:
sigoden 2024-05-14 09:04:49 +00:00
parent fe2358506d
commit 5f0369aa39

View file

@ -886,12 +886,12 @@ async function assertResOK(res) {
} }
function getEncoding(contentType) { function getEncoding(contentType) {
const charset = contentType?.split(";")[1]; const charset = contentType?.split(";")[1];
if (/charset/i.test(charset)) { if (/charset/i.test(charset)) {
let encoding = charset.split("=")[1]; let encoding = charset.split("=")[1];
if (encoding) { if (encoding) {
return encoding.toLowerCase() return encoding.toLowerCase()
}
} }
return 'utf-8' }
return 'utf-8'
} }