diff --git a/assets/index.js b/assets/index.js index 7e6de9e..de2dc7c 100644 --- a/assets/index.js +++ b/assets/index.js @@ -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' }