Skip to content

Commit 486e6fa

Browse files
committed
Use Enum.map + Enum.sum instead of Enum.sum_by to support older versions
1 parent 573a95f commit 486e6fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/owl/live_screen.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ defmodule Owl.LiveScreen do
578578
defp render_above(%{put_above_blocks: []} = state), do: {state, [], &noop/0}
579579

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

584584
cursor_up =

0 commit comments

Comments
 (0)