lib/react/function_component/resolution.rb in isomorfeus-react-16.6.3 vs lib/react/function_component/resolution.rb in isomorfeus-react-16.6.4
- old
+ new
@@ -46,22 +46,13 @@
if (component) {
var props = null;
if (args.length > 0) {
var last_arg = args[args.length - 1];
if (typeof last_arg === 'string' || last_arg instanceof String) {
- if (args.length === 1) {
- Opal.React.internal_render(component, null, last_arg, null);
- } else {
- props = Opal.React.to_native_react_props(args[0]);
- Opal.React.internal_render(component, props, last_arg, null);
- }
- } else {
- props = Opal.React.to_native_react_props(args[0]);
- Opal.React.internal_render(component, props, null, block);
- }
- } else {
- Opal.React.internal_render(component, null, null, block);
- }
+ if (args.length === 1) { Opal.React.internal_render(component, null, last_arg, null); }
+ else { Opal.React.internal_render(component, args[0], last_arg, null); }
+ } else { Opal.React.internal_render(component, args[0], null, block); }
+ } else { Opal.React.internal_render(component, null, null, block); }
} else {
return #{_react_component_resolution_original_method_missing(component_name, *args, block)};
}
}
end
\ No newline at end of file