Skip to content

Commit

Permalink
instantiate pusher using Pusher class from option (#359)
Browse files Browse the repository at this point in the history
* instantiate pusher using Pusher class from option.

* Update pusher-connector.ts

Co-authored-by: ponleu <ponleu@go24.sg>
Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
3 people committed Oct 19, 2022
1 parent 088a232 commit 39b3ba7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/connector/pusher-connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export class PusherConnector extends Connector {
connect(): void {
if (typeof this.options.client !== 'undefined') {
this.pusher = this.options.client;
} else if (this.options.Pusher) {
this.pusher = new this.options.Pusher(this.options.key, this.options);
} else {
this.pusher = new Pusher(this.options.key, this.options);
}
Expand Down

0 comments on commit 39b3ba7

Please sign in to comment.