Skip to content

Commit

Permalink
Return single child in case of single child.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbiedermann committed Mar 14, 2020
1 parent 6486242 commit 462e582
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -22,7 +22,9 @@ def self.extended(base)
if (block_result && block_result !== nil) { oper.render_block_result(block_result); }
oper.active_components.pop();
// console.log("function popping", oper.render_buffer, oper.render_buffer.toString());
return oper.render_buffer.pop();
let result = oper.render_buffer.pop();
if (result.length === 1) { return result[0]; }
return result;
}
base.react_component.displayName = #{component_name};
}
Expand Down

0 comments on commit 462e582

Please sign in to comment.