diff --git a/lib/livebook_web/live/hub/edit_live.ex b/lib/livebook_web/live/hub/edit_live.ex index caaaa1f17..5de339307 100644 --- a/lib/livebook_web/live/hub/edit_live.ex +++ b/lib/livebook_web/live/hub/edit_live.ex @@ -9,7 +9,9 @@ defmodule LivebookWeb.Hub.EditLive do @impl true def mount(_params, _session, socket) do - Hubs.subscribe([:connection]) + if connected?(socket) do + Hubs.subscribe([:connection]) + end {:ok, assign(socket, hub: nil, type: nil, page_title: "Hub - Livebook", params: %{})} end