Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor channels names(only readability fix) #390

Closed
wants to merge 1 commit into from

Conversation

erikn69
Copy link

@erikn69 erikn69 commented Feb 2, 2024

This PR only adds better readability,
avoid repeating the same code many times
Is there any reason to repeat names like that?

//before
if (!this.channels['private-' + name]) {
    this.channels['private-' + name] = new PusherPrivateChannel(this.pusher, 'private-' + name, this.options);
}
//after
name = 'private-' + name;
if (!this.channels[name]) {
    this.channels[name] = new PusherPrivateChannel(this.pusher, name, this.options);
}

@erikn69 erikn69 changed the title Refactor channels names Refactor channels names(only readability fix) Feb 2, 2024
@taylorotwell
Copy link
Member

If there is no bug I think it is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants