2016-07-26 148 views
1

我想我找到了一个假阳性:的javascript:S2583假阳性

const items = document.querySelectorAll(selectors); 
for (const item of items) { 
    if(item) { //Change this condition so that it does not always evaluate to "false". 
    .... 
    } 
} 

改变这种状况,使得它并不总是评估为“假”。

我不明白为什么它创建这张票。我可以理解,如果它会说它总是评估为“真”,因为document.querySelectorAll不应返回null结果。

任何想法?

我们使用JavaScript插件的2.13版本。

回答

1

版本2.14不会引发这类代码的问题。

+0

将尝试新版本,感谢您的帮助。 –