Skip to content

Commit

Permalink
Refactor(NoteList): Use already assigned list iterator
Browse files Browse the repository at this point in the history
In the existing code we're recomputing the current list item in the note list
when we've already assigned it above. In this patch we're using the
already-assigned value.

This is part of broader work to separate modifying the search parameters from
actually filtering the notes and was originally created as part of an
exploratory PR #1807.
  • Loading branch information
dmsnell committed Jan 4, 2020
1 parent 53d38e2 commit 9cf7a3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- Added React Hooks ESLint Plugin [#1789](https://github.com/Automattic/simplenote-electron/pull/1789)
- Added end-to-end testing with Spectron [#1773](https://github.com/Automattic/simplenote-electron/pull/1773)
- Removed a workaround for indexing note pinned status [#1795](https://github.com/Automattic/simplenote-electron/pull/1795)
- Maintenance cleanups [#1796](https://github.com/Automattic/simplenote-electron/pull/1796), [#1797](https://github.com/Automattic/simplenote-electron/pull/1797)
- Maintenance cleanups [#1796](https://github.com/Automattic/simplenote-electron/pull/1796), [#1797](https://github.com/Automattic/simplenote-electron/pull/1797), [#1808](https://github.com/Automattic/simplenote-electron/pull/1808)
- Updated dependencies [#1802](https://github.com/Automattic/simplenote-electron/pull/1802)

## [v1.13.0]
Expand Down
2 changes: 1 addition & 1 deletion lib/note-list/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const rowHeightCache = f => (

const { preview } = getNoteTitleAndPreview(note);

const key = notes[index].id;
const key = note.id;
const cached = previewCache.get(key);

if ('undefined' !== typeof cached) {
Expand Down

0 comments on commit 9cf7a3e

Please sign in to comment.