mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 16:48:50 +00:00
fix check for undefined ws
fixes https://github.com/nbd-wtf/nostr-tools/issues/271
This commit is contained in:
4
relay.ts
4
relay.ts
@@ -386,8 +386,8 @@ export function relayInit(
|
|||||||
listeners = newListeners()
|
listeners = newListeners()
|
||||||
subListeners = {}
|
subListeners = {}
|
||||||
pubListeners = {}
|
pubListeners = {}
|
||||||
if (ws.readyState === WebSocket.OPEN) {
|
if (ws?.readyState === WebSocket.OPEN) {
|
||||||
ws?.close()
|
ws.close()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
get status() {
|
get status() {
|
||||||
|
|||||||
Reference in New Issue
Block a user