Skip to content

Commit

Permalink
pre-check is added to createChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
diloabininyeri committed Jan 29, 2024
1 parent 5343329 commit 3680052
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Broadcast.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function getChannels(): array
*/
public function createChannel(string $channelName): Channel
{
return $this->channels[$channelName] = new Channel($channelName);
return $this->channels[$channelName] ??= new Channel($channelName);
}

/***
Expand Down

0 comments on commit 3680052

Please sign in to comment.