Hi everyone,
I’m going through the tutorial for drab and got to the case example. After copying the code from the example to my own files, I ran iex -S mix phx.server
and visited localhost. When I clicked the uppercase button, I got the following error :
[error] Drab Handler failed with the following exception:
** (Protocol.UndefinedError) protocol Enumerable not implemented for nil. This protocol is implemented for: DBConnection.PrepareStream, DBConnection.Stream, Date.Range, Ecto.Adapters.SQL.Stream, File.Stream, Floki.HTMLTree, Function, GenEvent.Stream, HashDict, HashSet, IO.Stream, List, Map, MapSet, Postgrex.Stream, Range,Stream
(elixir) lib/enum.ex:1: Enumerable.impl_for!/1
(elixir) lib/enum.ex:141: Enumerable.reduce/3
(elixir) lib/enum.ex:1919: Enum.reduce/3
(drab) lib/drab/live.ex:968: Drab.Live.decrypted_assigns/1
(drab) lib/drab/live.ex:958: Drab.Live.decrypted_from_browser/1
(drab) lib/drab/live.ex:918: Drab.Live.assigns_and_nodrab/1
(drab) lib/drab/live.ex:574: Drab.Live.do_poke/5
(drab) lib/drab.ex:359: anonymous fn/7 in Drab.handle_event/6
Anyone have any idea what this is and how to fix it?