Skip to content

Commit

Permalink
Do not send messages to unconnected live view process
Browse files Browse the repository at this point in the history
  • Loading branch information
tfwright committed Nov 13, 2023
1 parent da04b2d commit 15c3fd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/live_admin/components/container.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defmodule LiveAdmin.Components.Container do
loading: !connected?(socket)
)

Process.send_after(self(), :clear_flash, 2000)
if connected?(socket), do: Process.send_after(self(), :clear_flash, 2000)

{:ok, socket}
end
Expand Down

0 comments on commit 15c3fd4

Please sign in to comment.