【发布时间】:2020-07-27 03:17:55
【问题描述】:
我有一个警告,嵌套块是多余的,没有单独的块。
{
products.forEach((product) => {
this.props.currentUserTags.forEach((tag) => {
if (tag.id === product.tag.id) {
recommendations.push(product);
}
});
});
}
对于这个警告,我不确定我可以对这个语法进行哪些更改?
【问题讨论】:
-
去掉外面的花括号