Skip to content

Commit dcc9891

Browse files
committed
Don't use WebSocket in Node context #280
#280
1 parent 13710be commit dcc9891

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This changelog covers all three packages, as they are (for now) updated as a whole
44

5+
## v0.34.10
6+
7+
- Don't use WebSocket in Node context #280
8+
59
## v0.34.9
610

711
- Fix @tomic/lib exports for non-ts contexts #270

lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.34.9",
2+
"version": "0.34.10",
33
"author": "Joep Meindertsma",
44
"dependencies": {
55
"@noble/ed25519": "1.6.0",

lib/src/store.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ export class Store {
195195
if (found) {
196196
return found;
197197
} else {
198-
this.webSockets.set(url.origin, startWebsocket(url.origin, this));
198+
if (typeof window !== 'undefined') {
199+
this.webSockets.set(url.origin, startWebsocket(url.origin, this));
200+
}
199201
}
200202

201203
return;

react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.34.9",
2+
"version": "0.34.10",
33
"author": "Joep Meindertsma",
44
"description": "Atomic Data React library",
55
"dependencies": {

0 commit comments

Comments
 (0)