Skip to content

Commit e7e3857

Browse files
make a condition simpler
Co-authored-by: Alexey Romanov <[email protected]>
1 parent 63cc100 commit e7e3857

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/react_on_rails/helper.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,7 @@ def raise_prerender_error(json_result, react_component_name, props, js_code)
582582

583583
def should_raise_streaming_prerender_error?(chunk_json_result, render_options)
584584
chunk_json_result["hasErrors"] &&
585-
((render_options.raise_on_prerender_error && !chunk_json_result["isShellReady"]) ||
586-
(render_options.raise_non_shell_server_rendering_errors && chunk_json_result["isShellReady"]))
585+
(chunk_json_result["isShellReady"] ? render_options.raise_non_shell_server_rendering_errors : render_options.raise_on_prerender_error)
587586
end
588587

589588
# Returns object with values that are NOT html_safe!

0 commit comments

Comments
 (0)