Skip to content

Commit 1f3a65d

Browse files
fix: 🐛 一般无 content-length
1 parent 6510812 commit 1f3a65d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

web/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ async function tryCreateConversationId(trycount = 0) {
140140
const conversationRes = await fetch('/turing/conversation/create', {
141141
credentials: 'include',
142142
}).then(async (res) => {
143-
if (res.status === 200 && +res.headers.get('content-length') > 0) {
143+
if (res.status === 200 && res.body && !res.body.locked) {
144144
return await res.json();
145145
} else {
146146
return 'error';

web/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ workbox.precaching.precacheAndRoute([
5656
},
5757
{
5858
url: '/web/js/index.js',
59-
revision: '2023.05.06',
59+
revision: '2023.05.06.11',
6060
},
6161
// html
6262
{

0 commit comments

Comments
 (0)