Skip to content

Commit

Permalink
make a condition simpler
Browse files Browse the repository at this point in the history
Co-authored-by: Alexey Romanov <[email protected]>
  • Loading branch information
AbanoubGhadban and alexeyr-ci authored Oct 31, 2024
1 parent 63cc100 commit e7e3857
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/react_on_rails/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,7 @@ def raise_prerender_error(json_result, react_component_name, props, js_code)

def should_raise_streaming_prerender_error?(chunk_json_result, render_options)
chunk_json_result["hasErrors"] &&
((render_options.raise_on_prerender_error && !chunk_json_result["isShellReady"]) ||
(render_options.raise_non_shell_server_rendering_errors && chunk_json_result["isShellReady"]))
(chunk_json_result["isShellReady"] ? render_options.raise_non_shell_server_rendering_errors : render_options.raise_on_prerender_error)
end

# Returns object with values that are NOT html_safe!
Expand Down

0 comments on commit e7e3857

Please sign in to comment.