Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed 2 lines that are redundant anyways (please verify) #2764

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions lib/phoenix_live_view/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,8 @@ defmodule Phoenix.LiveView.Router do
expected a map with string keys or an MFA tuple, got #{inspect(bad_session)}
"""

{:root_layout, {mod, template}}, acc when is_atom(mod) and is_binary(template) ->
template = Phoenix.LiveView.Utils.normalize_layout(template, "live_session :root_layout")
Map.put(acc, :root_layout, {mod, String.to_atom(template)})
{:root_layout, {mod, template}}, _acc when is_atom(mod) and is_binary(template) ->
Phoenix.LiveView.Utils.normalize_layout(template, "live_session :root_layout")

{:root_layout, {mod, template}}, acc when is_atom(mod) and is_atom(template) ->
Map.put(acc, :root_layout, {mod, template})
Expand All @@ -294,9 +293,8 @@ defmodule Phoenix.LiveView.Router do
expected a tuple with the view module and template atom name, got #{inspect(bad_layout)}
"""

{:layout, {mod, template}}, acc when is_atom(mod) and is_binary(template) ->
template = Phoenix.LiveView.Utils.normalize_layout(template, "live_session :layout")
Map.put(acc, :layout, {mod, template})
{:layout, {mod, template}}, _acc when is_atom(mod) and is_binary(template) ->
Phoenix.LiveView.Utils.normalize_layout(template, "live_session :layout")

{:layout, {mod, template}}, acc when is_atom(mod) and is_atom(template) ->
Map.put(acc, :layout, {mod, template})
Expand Down
Loading