Skip to content

Commit

Permalink
Merge pull request #13 from kesne/patch-1
Browse files Browse the repository at this point in the history
Fix issue with end tag style
  • Loading branch information
roonyh authored Jun 22, 2016
2 parents 74fd709 + 2e4733d commit b0a9bb2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,19 @@ export default class Node extends React.Component {
<span style={tagStyle}> /&gt;</span>
</div>;
}

// Keep a copy so that further mutations to containerStyle don't impact us:
const containerStyleCopy = Object.assign({}, containerStyle);

// tag with children
return <div>
<div style={containerStyle}>
<div style={containerStyleCopy}>
<span style={tagStyle}>&lt;{name}</span>
<Props node={node} />
<span style={tagStyle}>&gt;</span>
</div>
{React.Children.map(children, childElement => <Node node={childElement} depth={depth + 1}/>)}
<div style={containerStyle}>
<div style={containerStyleCopy}>
<span style={tagStyle}>&lt;/{name}&gt;</span>
</div>
</div>
Expand Down

0 comments on commit b0a9bb2

Please sign in to comment.