-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set the leaf property to true instead of 1 #12734
Conversation
### Problem description If the leaf property of elements is set to 1, function TreeNode.isLeaf () stops working correctly. ``` isLeaf : function(){ return this.leaf === true; } ```
I found many more of these, maybe a folder search in the modx repo will reveal them to you as well =), for example in:
|
Hi @sergant210 - it doesn't look like there's a CLA for you on file. Could you please head over to modx.com/cla to get that squared away? We also have a template for pull request descriptions at https://github.com/modxcms/revolution/blob/2.x/CONTRIBUTING.md#template-1 - if you follow those three questions, that gives us a bit more information on how to test your contribution and provides a useful log of things. Could you please elaborate a bit on that, even though this is such a small patch (in terms of line of code, not in effort figuring it out I'm sure!) |
What does it do ?Set the leaf property of elements from the elements tree to true instead of 1. This must be also fixed in the files described by exside above. Why is it needed ?Without this fix you can not check tree nodes by the function Node.isLeaf(). Related issue(s)/PR(s)Not found. |
Hi @sergant210 - would it be possible for you to update the pull request with the other files noted as well? If you don't have time for that I can get this merged, but it sounds like this is an area where we could get more consistency in general. |
@Mark-H Ok. I'll try. |
@Mark-H Done. |
Problem description
If the leaf property of elements is set to 1, function TreeNode.isLeaf () stops working correctly.