From 5f0369aa3904b386a21760aba63411c7b8cc9e4c Mon Sep 17 00:00:00 2001 From: sigoden Date: Tue, 14 May 2024 09:04:49 +0000 Subject: [PATCH] chore: js format --- assets/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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' }