Skip to content

Commit

Permalink
Fix checking http or ws transport
Browse files Browse the repository at this point in the history
PR-URL: #439
  • Loading branch information
tshemsedinov committed Aug 19, 2023
1 parent 19e7de3 commit ff9b378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Client extends EventEmitter {

sendEvent(name, data) {
const packet = { type: 'event', name, data };
if (!this.connection) {
if (!this.#transport.connection) {
throw new Error(`Can't send metacom event to http transport`);
}
this.send(packet);
Expand Down

0 comments on commit ff9b378

Please sign in to comment.