mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-08 20:46:16 +08:00
Fix error on back after closing session (#769)
* Fix error on back after closing session Clicking the browsers back button after closing a session resulted in an error since it was trying to close an already closed notebook * Overwrite back history on section delete
This commit is contained in:
parent
3f86af051c
commit
feb0ac214e
2 changed files with 2 additions and 2 deletions
|
@ -30,6 +30,6 @@ defmodule LivebookWeb.HomeLive.CloseSessionComponent do
|
||||||
@impl true
|
@impl true
|
||||||
def handle_event("close", %{}, socket) do
|
def handle_event("close", %{}, socket) do
|
||||||
Livebook.Session.close(socket.assigns.session.pid)
|
Livebook.Session.close(socket.assigns.session.pid)
|
||||||
{:noreply, push_patch(socket, to: socket.assigns.return_to)}
|
{:noreply, push_patch(socket, to: socket.assigns.return_to, replace: true)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -44,6 +44,6 @@ defmodule LivebookWeb.SessionLive.DeleteSectionComponent do
|
||||||
delete_cells?
|
delete_cells?
|
||||||
)
|
)
|
||||||
|
|
||||||
{:noreply, push_patch(socket, to: socket.assigns.return_to)}
|
{:noreply, push_patch(socket, to: socket.assigns.return_to, replace: true)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue