Skip to content

Commit

Permalink
Add nil clause for meta::Jason encode()
Browse files Browse the repository at this point in the history
  • Loading branch information
rtshkmr committed Jul 31, 2024
1 parent c77a4d6 commit fe5d51f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/vyasa/medium/meta.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,12 @@ defmodule Vyasa.Medium.Meta do
) do
Map.from_struct(m) |> Jason.Encode.map(opts)
end

def encode(
nil,
opts
) do
Jason.Encode.map(%{}, opts)
end
end
end

0 comments on commit fe5d51f

Please sign in to comment.