You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ah, good point. We should check that it's equal as an atom or as a string. Probably best to do to_string/1 on both before comparing. Would you be interested in PRing that fix?
The problem was that I declared a state attribute myself, and that it had typed :string instead of :atom. This explains why the default value came back as string instead of an atom. I also assumed I had to create a custom attribute myself which turns out it wasn't necessary. I permitted myself to add this to the docs in #62.
When a custom attribute for the state is defined:
The following error is thrown:
Digging deeper I found that the
default :initial_state
attribute option arrives inside the transformer converted to a string:And so the comparison
attribute.default != default
compares:initial_state
with"initial_state"
and always returns an error.The text was updated successfully, but these errors were encountered: