Skip to content

Commit

Permalink
Fix hasChildren() when children = []
Browse files Browse the repository at this point in the history
Close #316
  • Loading branch information
mar10 committed Sep 15, 2014
1 parent 4a78890 commit 5b9bf2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* [Improved] #313 Allow HTML in tooltips
* [Fixed] crash in scrollIntoView() when parent is `window`
* [Fixed] #305 Checkbox doesn't show with Glyph + Table
* [Fixed] #316 Fix hasChildren() when children = []
* [Deprecated] node.isRoot(). Use node.isRootNode() instead

# 2.3.0 / 2014-08-17
Expand Down
2 changes: 1 addition & 1 deletion src/jquery.fancytree.js
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ FancytreeNode.prototype = /** @lends FancytreeNode# */{
}
return true;
}
return !!this.children;
return ( this.children && this.children.length );
},
/** Return true if node has keyboard focus.
* @returns {boolean}
Expand Down

0 comments on commit 5b9bf2c

Please sign in to comment.