Skip to content

Commit

Permalink
Apply fixes from StyleCI (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid committed Jun 17, 2021
1 parent 99abdbe commit 39f8171
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/channel/pusher-channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,13 @@ export class PusherChannel extends Channel {
*/
listenToAll(callback: Function): PusherChannel {
this.subscription.bind_global((event, data) => {
if (event.startsWith('pusher:')){
if (event.startsWith('pusher:')) {
return;
}

let namespace = this.options.namespace.replace(/\./g, '\\');

let formattedEvent = event.startsWith(namespace)
? event.substring(namespace.length + 1)
: '.' + event;
let formattedEvent = event.startsWith(namespace) ? event.substring(namespace.length + 1) : '.' + event;

callback(formattedEvent, data);
});
Expand Down

0 comments on commit 39f8171

Please sign in to comment.