relay.status() returns 0 when ws not created

This commit is contained in:
Martti Malmi
2022-12-21 11:08:10 +02:00
committed by GitHub
parent 83148e8bdf
commit adc1854ac6

View File

@@ -305,7 +305,7 @@ export function relayInit(url: string): Relay {
}) })
}, },
get status() { get status() {
return ws.readyState return ws?.readyState ?? 0
} }
} }
} }