Skip to content

Commit

Permalink
fix(useWebSocket): set initial status as CLOSED (#1960)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaii3 committed Jul 20, 2022
1 parent 6b1ffe5 commit a5d764a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useWebSocket/index.ts
Expand Up @@ -148,7 +148,7 @@ export function useWebSocket<Data = any>(
} = options

const data: Ref<Data | null> = ref(null)
const status = ref<WebSocketStatus>('CONNECTING')
const status = ref<WebSocketStatus>('CLOSED')
const wsRef = ref<WebSocket | undefined>()

let heartbeatPause: Fn | undefined
Expand Down

0 comments on commit a5d764a

Please sign in to comment.