Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a48c248

Browse files
committed
fix: do not show false connecting overlay on legacy Vite, close #497
1 parent 271355e commit a48c248

File tree

1 file changed

+4
-1
lines changed
  • packages/devtools/client/composables

1 file changed

+4
-1
lines changed

packages/devtools/client/composables/rpc.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ async function connectVite() {
5353
'/',
5454
])
5555

56-
if (!hot)
56+
if (!hot) {
57+
wsConnecting.value = true
5758
throw new Error('Unable to connect to devtools')
59+
}
5860

5961
hot.on(WS_EVENT_NAME, (data) => {
62+
wsConnecting.value = false
6063
onMessage(data)
6164
})
6265

0 commit comments

Comments
 (0)