Skip to content

Commit

Permalink
Use Enum.map + Enum.sum instead of Enum.sum_by to support older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fuelen committed Feb 8, 2025
1 parent 573a95f commit 486e6fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/owl/live_screen.ex
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ defmodule Owl.LiveScreen do
defp render_above(%{put_above_blocks: []} = state), do: {state, [], &noop/0}

defp render_above(%{put_above_blocks: put_above_blocks} = state) do
blocks_height = Enum.sum_by(Map.values(state.rendered_content_height), & &1.rendered)
blocks_height = Enum.sum(Enum.map(Map.values(state.rendered_content_height), & &1.rendered))
data = Enum.reverse(put_above_blocks)

cursor_up =
Expand Down

0 comments on commit 486e6fa

Please sign in to comment.