@@ -174,7 +174,7 @@ defmodule Phoenix.LiveView.Static do
174174 ]
175175
176176 try do
177- { :ok , to_rendered_content_tag ( socket , tag , view , attrs ) }
177+ { :ok , to_rendered_content_tag ( socket , tag , view , attrs ) , socket . assigns }
178178 catch
179179 :throw , { :phoenix , :child_redirect , redirected , flash } ->
180180 { :stop , Utils . replace_flash ( % { socket | redirected: redirected } , flash ) }
@@ -210,7 +210,7 @@ defmodule Phoenix.LiveView.Static do
210210 )
211211
212212 # TODO: handle call timeout
213- with { :ok , iodata } <- GenServer . call ( pid , { :phoenix , :disconnected_adoptable_render } ) do
213+ with { :ok , iodata , assigns } <- GenServer . call ( pid , { :phoenix , :disconnected_adoptable_render } ) do
214214 data_attrs = [
215215 phx_session: sign_root_session ( socket , router , view , to_sign_session , live_session ) ,
216216 phx_static: sign_static_token ( socket ) ,
@@ -225,7 +225,9 @@ defmodule Phoenix.LiveView.Static do
225225 | extended_attrs
226226 ]
227227
228- { :ok , content_tag ( tag , attrs , iodata ) }
228+ # TODO: we currently expect the socket assigns for LiveViewTest
229+ # check if we can aboid copying assigns...
230+ { :ok , content_tag ( tag , attrs , iodata ) , assigns }
229231 end
230232 end
231233 end
0 commit comments