diff --git a/lib/decentralised_book_index_web/live/book_live/show.ex b/lib/decentralised_book_index_web/live/book_live/show.ex index 959de2b..70e2518 100644 --- a/lib/decentralised_book_index_web/live/book_live/show.ex +++ b/lib/decentralised_book_index_web/live/book_live/show.ex @@ -121,7 +121,7 @@ defmodule DecentralisedBookIndexWeb.BookLive.Show do authors_string = author_roles |> Enum.map(fn author_role -> - if author_role.role == "" do + if author_role.role in ["", nil] do {"#{author_role.author.name}", author_role.author.id} else {"#{author_role.author.name} (#{author_role.role})", author_role.author.id}