Skip to content

Commit ad9b93c

Browse files
linting
1 parent 2ec583e commit ad9b93c

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

lib/react_on_rails/helper.rb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ def raise_prerender_error(json_result, react_component_name, props, js_code)
581581
end
582582

583583
def should_raise_streaming_prerender_error?(chunk_json_result, render_options)
584-
chunk_json_result["hasErrors"] &&
585-
((render_options.raise_on_prerender_error && !chunk_json_result["isShellReady"]) ||
584+
chunk_json_result["hasErrors"] &&
585+
((render_options.raise_on_prerender_error && !chunk_json_result["isShellReady"]) ||
586586
(render_options.raise_non_shell_server_rendering_errors && chunk_json_result["isShellReady"]))
587587
end
588588

@@ -638,15 +638,13 @@ def server_rendered_react_component(render_options)
638638
if should_raise_streaming_prerender_error?(chunk_json_result, render_options)
639639
raise_prerender_error(chunk_json_result, react_component_name, props, js_code)
640640
end
641-
# It doesn't make any transformation, it listens to the streamed chunks and raise error if it has errors
641+
# It doesn't make any transformation, it listens to the streamed chunks and raise error if it has errors
642642
chunk_json_result
643643
end
644-
else
645-
if result["hasErrors"] && render_options.raise_on_prerender_error
646-
raise_prerender_error(result, react_component_name, props, js_code)
647-
end
644+
elsif result["hasErrors"] && render_options.raise_on_prerender_error
645+
raise_prerender_error(result, react_component_name, props, js_code)
648646
end
649-
647+
650648
result
651649
end
652650

lib/react_on_rails/react_component/render_options.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ def retrieve_configuration_value_for(key)
136136
def retrieve_react_on_rails_pro_config_value_for(key)
137137
options.fetch(key) do
138138
return nil unless ReactOnRails::Utils.react_on_rails_pro?
139+
139140
ReactOnRailsPro.configuration.public_send(key)
140141
end
141142
end

0 commit comments

Comments
 (0)