andrewdavey / andrewdavey/immutable-devtools

Typo in renderIterableBody?

Offen
#36 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
671
Forks
32
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.