Skip to content

Commit

Permalink
fix: check exists channel id
Browse files Browse the repository at this point in the history
  • Loading branch information
chipslays committed Feb 16, 2023
1 parent 3d67940 commit 06d1e4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Channels.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ public function create(string $id, array $data = []): Channel
*/
public function delete(string $id): void
{
if (!$this->exists($id)) {
return;
}

unset($this->channels[$id]);
}

Expand Down

0 comments on commit 06d1e4b

Please sign in to comment.