File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -406,11 +406,12 @@ def build_react_component_result_for_server_streamed_content(
406406 rendered_html_stream = rendered_html_stream . transform do |chunk |
407407 if is_first_chunk
408408 is_first_chunk = false
409- next <<-HTML
409+ html_content = <<-HTML
410410 #{ rails_context_if_not_already_rendered }
411411 #{ component_specification_tag }
412412 < #{ content_tag_options_html_tag } id="#{ render_options . dom_id } "> #{ chunk } </ #{ content_tag_options_html_tag } >
413413 HTML
414+ html_content . strip
414415 end
415416 chunk
416417 end
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ See https://github.com/shakacode/react_on_rails#renderer-functions`);
200200 }
201201
202202 renderResult = new PassThrough ( ) ;
203- ReactDOMServer . renderToPipeableStream ( reactRenderingResult as ReactElement ) . pipe ( renderResult ) ;
203+ ReactDOMServer . renderToPipeableStream ( reactRenderingResult ) . pipe ( renderResult ) ;
204204
205205 // TODO: Add console replay script to the stream
206206 // Ensure to avoid console messages leaking between different components rendering
You can’t perform that action at this time.
0 commit comments