Skip to content

Commit

Permalink
allows passing the pusher client to a new echo instance
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaasBrueggemann committed Jun 22, 2018
1 parent a25240e commit 1445639
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/connector/pusher-connector.ts
Expand Up @@ -27,7 +27,11 @@ export class PusherConnector extends Connector {
* @return void
*/
connect(): void {
this.pusher = new Pusher(this.options.key, this.options);
if (typeof this.options.client !== 'undefined') {
this.pusher = this.options.client;
} else {
this.pusher = new Pusher(this.options.key, this.options);
}
}

/**
Expand Down

0 comments on commit 1445639

Please sign in to comment.