Skip to content

Commit ebd67c4

Browse files
authored
refactoring codes (#1958)
1 parent 1b313b3 commit ebd67c4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/phoenix_live_view/channel.ex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ defmodule Phoenix.LiveView.Channel do
269269
read_socket(state, cid, fn socket, _ ->
270270
result =
271271
with {:ok, uploads} <- Map.fetch(socket.assigns, :uploads),
272-
{:ok, conf} <- Map.fetch(uploads, name),
273-
do: {:ok, conf}
272+
do: Map.fetch(uploads, name)
274273

275274
{:reply, result, state}
276275
end)

test/phoenix_live_view/test/dom_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule Phoenix.LiveViewTest.DOMTest do
55

66
describe "find_live_views" do
77
# >= 4432 characters
8-
@too_big_session Enum.map(1..4432, fn _ -> "t" end) |> Enum.join()
8+
@too_big_session Enum.map_join(1..4432, fn _ -> "t" end)
99

1010
test "finds views given html" do
1111
assert DOM.find_live_views(

0 commit comments

Comments
 (0)