andrewdavey / andrewdavey/immutable-devtools

Typo in renderIterableBody?

未關閉
#36 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
671
分支
32
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。