@@ -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,8 @@ 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 } <-
214+ GenServer . call ( pid , { :phoenix , :disconnected_adoptable_render } ) do
214215 data_attrs = [
215216 phx_session: sign_root_session ( socket , router , view , to_sign_session , live_session ) ,
216217 phx_static: sign_static_token ( socket ) ,
@@ -225,7 +226,9 @@ defmodule Phoenix.LiveView.Static do
225226 | extended_attrs
226227 ]
227228
228- { :ok , content_tag ( tag , attrs , iodata ) }
229+ # TODO: we currently expect the socket assigns for LiveViewTest
230+ # check if we can aboid copying assigns...
231+ { :ok , content_tag ( tag , attrs , iodata ) , assigns }
229232 end
230233 end
231234 end
0 commit comments