Skip to content

Commit

Permalink
Fix ws.readyState not being available and bumpy
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Feb 17, 2023
1 parent d0d2bc7 commit f21f469
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nostr-relay-inspector",
"version": "0.0.32",
"version": "0.0.33",
"description": "js library for inspecting nostr relays",
"main": "index.js",
"type": "module",
Expand All @@ -15,4 +15,4 @@
"nostr": "0.2.7",
"tape": "5.6.1"
}
}
}
2 changes: 2 additions & 0 deletions src/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,5 +569,7 @@ Inspector.prototype.cbcall = function(method) {
}

const wsIsOpen = function(ws){
if(!ws?.readyState || !ws?.OPEN)
return
return ws.readyState === ws.OPEN
}

0 comments on commit f21f469

Please sign in to comment.