Skip to content

Commit

Permalink
chore: js format
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed May 14, 2024
1 parent fe23585 commit 5f0369a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

0 comments on commit 5f0369a

Please sign in to comment.