Skip to content

Commit

Permalink
Apply requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LVala committed Aug 5, 2024
1 parent 5bb1671 commit 8de7614
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/ex_webrtc/sdp_utils.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ defmodule ExWebRTC.SDPUtils do
end

defp ensure_non_empty(sdp) do
case length(sdp.media) do
0 -> {:error, :empty_sdp}
_other -> :ok
if Enum.empty?(sdp.media) do
{:error, :empty_sdp}
else
:ok
end
end

Expand Down

0 comments on commit 8de7614

Please sign in to comment.