chore: js format
This commit is contained in:
parent
fe2358506d
commit
5f0369aa39
1 changed files with 7 additions and 7 deletions
|
@ -886,12 +886,12 @@ async function assertResOK(res) {
|
|||
}
|
||||
|
||||
function getEncoding(contentType) {
|
||||
const charset = contentType?.split(";")[1];
|
||||
if (/charset/i.test(charset)) {
|
||||
let encoding = charset.split("=")[1];
|
||||
if (encoding) {
|
||||
return encoding.toLowerCase()
|
||||
}
|
||||
const charset = contentType?.split(";")[1];
|
||||
if (/charset/i.test(charset)) {
|
||||
let encoding = charset.split("=")[1];
|
||||
if (encoding) {
|
||||
return encoding.toLowerCase()
|
||||
}
|
||||
return 'utf-8'
|
||||
}
|
||||
return 'utf-8'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue