Skip to content

Commit

Permalink
TreeView: strings don't have children
Browse files Browse the repository at this point in the history
  • Loading branch information
janodvarko committed Nov 3, 2015
1 parent 2a910a7 commit 36a539c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/reps/tree-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ var TreeView = React.createFactory(React.createClass(
return this.fetchMembers(object, level);
}

// Strings don't have children. Note that 'long' strings are using
// the expander icon (+/-) to display the entire original value,
// but there are no child items.
if (typeof(object) == "string") {
return [];
}

var getObjectProperties = this.props.getObjectProperties ||
this.getObjectProperties;
var hasProperties = this.props.hasProperties ||
Expand Down

0 comments on commit 36a539c

Please sign in to comment.