Skip to content

Commit

Permalink
Fix a bug in map for_each.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadden committed Jun 29, 2020
1 parent 6e5962f commit 83eda8d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/alia/flow/for_each.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,13 @@ for_each(Context ctx, ContainerSignal const& container_signal, Fn&& fn)
named_block nb;
auto iteration_id = get_alia_id(item.first);
if (iteration_id != null_id)
{
nb.begin(nc, iteration_id);
}
else
nb.begin(nc, make_id(&item));
{
nb.begin(nc, make_id(item.first));
}
auto key = direct(item.first);
auto value = container_signal[key];
fn(ctx, key, value);
Expand Down

0 comments on commit 83eda8d

Please sign in to comment.