mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-11 01:18:12 +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
|
||||
def handle_event("close", %{}, socket) do
|
||||
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
|
||||
|
|
|
@ -44,6 +44,6 @@ defmodule LivebookWeb.SessionLive.DeleteSectionComponent do
|
|||
delete_cells?
|
||||
)
|
||||
|
||||
{:noreply, push_patch(socket, to: socket.assigns.return_to)}
|
||||
{:noreply, push_patch(socket, to: socket.assigns.return_to, replace: true)}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue