Skip to content

Commit

Permalink
[BUG FIX] [MER-3775] Allow embedded page links to open (#5092)
Browse files Browse the repository at this point in the history
* account for unordered pages

* use page_context instead of current_page
  • Loading branch information
darrensiegel authored Sep 11, 2024
1 parent b128445 commit 55d7ee6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
</div>
<.back_arrow
to={
if assigns[:request_path] in [nil, ""],
if assigns[:request_path] in [nil, ""] and @current_page != nil,
do:
~p"/sections/#{@section.slug}/learn?target_resource_id=#{@current_page["id"]}",
else: assigns[:request_path]
Expand All @@ -116,7 +116,7 @@
<%= live_render(@socket, OliWeb.Dialogue.WindowLive,
session: %{
"section_slug" => @section.slug,
"resource_id" => @current_page["id"],
"resource_id" => @page_context.page.resource_id,
"revision_id" => @page_context.page.id,
"is_page" => true
},
Expand Down

0 comments on commit 55d7ee6

Please sign in to comment.