Skip to content

Commit

Permalink
fix: do not show false connecting overlay on legacy Vite, #497
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 11, 2023
1 parent 271355e commit 24a68a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/devtools/client/composables/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ async function connectVite() {
'/',
])

if (!hot)
if (!hot) {
wsConnecting.value = true
throw new Error('Unable to connect to devtools')
}

hot.on(WS_EVENT_NAME, (data) => {
wsConnecting.value = false
onMessage(data)
})

Expand Down

0 comments on commit 24a68a1

Please sign in to comment.