Skip to content

Commit

Permalink
Limpiar valores de secciones reutilizadas al convertir una respuesta …
Browse files Browse the repository at this point in the history
…de buro (#49)
  • Loading branch information
erickueen authored and lnx1337 committed Jan 15, 2020
1 parent e6d9ee6 commit ca75067
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/response/parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,13 @@ defmodule Burox.Response.Parser do
is_same_section = section == next_tag
cond do
is_same_section ->
clean_values =
values
|> Map.keys()
|> Map.new(fn val -> {val, nil} end)

{next_values, final_tail} =
_match_section(section, tail, "", values, sections)
_match_section(section, tail, "", clean_values, sections)

{List.flatten([values] ++ [next_values]) , final_tail}

Expand Down

0 comments on commit ca75067

Please sign in to comment.