Skip to content

Commit ad58797

Browse files
committed
Fix tree.visitRows() for empty tree
Close mar10#975
1 parent e9b1de9 commit ad58797

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* [Added] `tree.debugTime()`, `tree.debugTimeEnd()` for debugging.
44
* [Fixed] #973 when use ext-grid in one tree, other tree not use ext-grid has error on click.
55
* [Fixed] #974 ext-grid: too much output in production mode.
6+
* [Fixed] #975 ext-grid: fix `tree.visitRows()` for empty tree.
67

78
# 2.33.0 / 2019-10-29
89
* [Added] event `preInit` (fired before nodes are loaded).

src/jquery.fancytree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3868,7 +3868,7 @@
38683868
* @since 2.28
38693869
*/
38703870
visitRows: function(fn, opts) {
3871-
if (!this.rootNode.children) {
3871+
if (!this.rootNode.hasChildren()) {
38723872
return false;
38733873
}
38743874
if (opts && opts.reverse) {

0 commit comments

Comments
 (0)