马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
错误提示:for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.eslintno-restricted-syntaxThe body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype.eslintguard-for-in - for(const name in nameSet) {
- //code
- }
复制代码 将上述for...in循环改成- Object.key(nameSet).forEach((name) => {
- //code
- })
复制代码 错误消失
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |