Skip to content
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

jquery.ztree.core.js line:806 x = false冗余? #510

Open
wchen8416 opened this issue Jul 28, 2022 · 2 comments
Open

jquery.ztree.core.js line:806 x = false冗余? #510

wchen8416 opened this issue Jul 28, 2022 · 2 comments

Comments

@wchen8416
Copy link

No description provided.

@wwx412775
Copy link
Contributor

wwx412775 commented Sep 6, 2022

从代码上看好像确实没有什么用定义x这个变量
proxy: function (e) {
var setting = data.getSetting(e.data.treeId);
if (!tools.uCanDo(setting, e)) return true;
var results = event.doProxy(e),
r = true, x = false;
for (var i = 0, l = results.length; i < l; i++) {
var proxyResult = results[i];
if (proxyResult.nodeEventCallback) {
x = true;
r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
}
if (proxyResult.treeEventCallback) {
x = true;
r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
}
}
return r;
}
x 变量全程都没有使用,是不是可以删掉

@zTree
Copy link
Owner

zTree commented Sep 7, 2022

是的,可以删掉

wwx412775 added a commit to wwx412775/zTree_v3 that referenced this issue Sep 7, 2022
zTree added a commit that referenced this issue Sep 8, 2022
jquery.ztree.core.js line:806 x = false冗余? #510
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants