Skip to content

Commit 2030aab

Browse files
committed
handle nil case
1 parent 1ba85c3 commit 2030aab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/algora/shared/util.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ defmodule Algora.Util do
285285
String.replace(string, ~r/[^a-zA-Z]/, "")
286286
end
287287

288+
def to_local_string(nil), do: nil
289+
288290
def to_local_string(datetime) do
289291
datetime
290292
|> DateTime.shift_zone!("Europe/Athens", Tzdata.TimeZoneDatabase)

0 commit comments

Comments
 (0)