From 1f3a65df2d8dc3b493388bc56f2f4bb6d37206c5 Mon Sep 17 00:00:00 2001 From: adams549659584 <13760614423@163.com> Date: Sat, 6 May 2023 11:29:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E4=B8=80=E8=88=AC=E6=97=A0=20co?= =?UTF-8?q?ntent-length?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/js/index.js | 2 +- web/sw.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/js/index.js b/web/js/index.js index 5c4d175..147096b 100644 --- a/web/js/index.js +++ b/web/js/index.js @@ -140,7 +140,7 @@ async function tryCreateConversationId(trycount = 0) { const conversationRes = await fetch('/turing/conversation/create', { credentials: 'include', }).then(async (res) => { - if (res.status === 200 && +res.headers.get('content-length') > 0) { + if (res.status === 200 && res.body && !res.body.locked) { return await res.json(); } else { return 'error'; diff --git a/web/sw.js b/web/sw.js index d640657..26680ff 100644 --- a/web/sw.js +++ b/web/sw.js @@ -56,7 +56,7 @@ workbox.precaching.precacheAndRoute([ }, { url: '/web/js/index.js', - revision: '2023.05.06', + revision: '2023.05.06.11', }, // html {