diff --git a/lib/livebook_web/live/session_live.ex b/lib/livebook_web/live/session_live.ex index 609ebacbb..a56e2a133 100644 --- a/lib/livebook_web/live/session_live.ex +++ b/lib/livebook_web/live/session_live.ex @@ -547,7 +547,9 @@ defmodule LivebookWeb.SessionLive do end def handle_event("fork_session", %{}, socket) do - notebook = Notebook.forked(socket.private.data.notebook) + # Fetch the data, as we don't keep cells' source in the state + data = Session.get_data(socket.assigns.session_id) + notebook = Notebook.forked(data.notebook) %{images_dir: images_dir} = Session.get_summary(socket.assigns.session_id) create_session(socket, notebook: notebook, copy_images_from: images_dir) end