andrewdavey / andrewdavey/immutable-devtools

Typo in renderIterableBody?

Đang mở
#36 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
671
Fork
32
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi, I was reading through the code of this library, and read the `renderIterableBody` function. Here is the source for it:

```javascript
const renderIterableBody = (collection, mapper, options = {}) => {
if (options.sorted) {
collection = collection.sortBy((value, key) => key);
}
const children = collection
.map(mapper)
.toList();

const jsList = []
// Can't just call toJS because that will also call toJS on children inside the list
children.forEach(child => jsList.push(child))

return [ 'ol', listStyle, ...children ];
}
```

It seems that the author carefully crafted the `jsList` list, but then forgot to use it, and mistakenly used `children` instead.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.