Open lizhongit opened 8 years ago
I am not sure I understand - why is the code above wrong?
@yoavaa If my DIR empty but icon are leaf, May be the DIR no any children leaf, but it is real DIR, I can open it
The new code:
function defaultIsLeaf(node, $scope) {
// return !node[$scope.options.nodeChildren] || node[$scope.options.nodeChildren].length === 0;
return !Array.isArray(node[$scope.options.nodeChildren]);
}
Original code:
Sometimes, My Dir will be empty, So except like this: