-
Notifications
You must be signed in to change notification settings - Fork 41
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
filter 函数存在问题 #5
Comments
可以试下这个demo,看下注释的那行
|
@xiaomoumou 你好,两种写法是不同的逻辑,主要是看预期是怎样的。 写法二: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这里
return func(node) || (node[children] && node[children].length)
写法有些问题。应该改为
return func(node) || (func(node)&&node[children] && node[children].length)
The text was updated successfully, but these errors were encountered: