Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #43 from gfx/merge_react_utils
Browse files Browse the repository at this point in the history
Merge react-utils into this project
  • Loading branch information
alexcurtis committed Sep 12, 2016
2 parents 9d0cab6 + 3ba4091 commit a2c1d73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"babel-runtime": "^5.8.29",
"deep-equal": "^1.0.1",
"radium": "^0.18.0",
"react-utils": "alexcurtis/react-utils",
"shallowequal": "^0.2.2",
"velocity-react": "^1.1.2"
}
Expand Down
5 changes: 3 additions & 2 deletions src/components/node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

import React from 'react';
import rutils from 'react-utils';
import {VelocityTransitionGroup} from 'velocity-react';

import NodeHeader from './header';
Expand Down Expand Up @@ -66,9 +65,11 @@ class TreeNode extends React.Component {
}
renderChildren(decorators){
if(this.props.node.loading){ return this.renderLoading(decorators); }
let children = this.props.node.children;
if (!Array.isArray(children)) { children = children ? [children] : []; }
return (
<ul style={this.props.style.subtree} ref="subtree">
{rutils.children.map(this.props.node.children, (child, index) =>
{children.map((child, index) =>
<TreeNode
{...this._eventBubbles()}
key={child.id || index}
Expand Down

0 comments on commit a2c1d73

Please sign in to comment.