Skip to content

Commit

Permalink
Fixed using multi_select with array field when value of field is `n…
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-zawislak committed Apr 1, 2018
1 parent c543559 commit 4bae7ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.6.5 (2017-04-01)
* Fixed using `multi_select` with array field when value of field is `nil`

## v0.6.4 (2017-03-08)
* Changed argument of `custom_value` callback

Expand Down
2 changes: 1 addition & 1 deletion lib/formex/view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ defmodule Formex.View do

new_val = case item.type do
:multiple_select ->
Enum.map(val, fn subval ->
Enum.map(val || [], fn subval ->
case subval do
substruct when is_map(substruct) ->
substruct.id
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Formex.Mixfile do
def project do
[
app: :formex,
version: "0.6.4",
version: "0.6.5",
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
Expand Down

0 comments on commit 4bae7ea

Please sign in to comment.