mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
chore: js format
This commit is contained in:
@@ -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'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user