Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change to use const instead of let
  • Loading branch information
asmsuechan committed Oct 13, 2017
commit 2415fbf676b1a5db00bbbfde6ad9c048ffee0ca4
8 changes: 4 additions & 4 deletions browser/main/NoteList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,15 @@ class NoteList extends React.Component {

sortByPin (unorderedNotes) {
const { data, params, location } = this.props
let storageKey = params.storageKey
let folderKey = params.folderKey
let storage = data.storageMap.get(storageKey)
const storageKey = params.storageKey
const folderKey = params.folderKey
const storage = data.storageMap.get(storageKey)
if (location.pathname.match(/\/home|\/starred|\/trash/)) {
return unorderedNotes
}
if (storage === undefined) return []

let folder = _.find(storage.folders, {key: folderKey})
const folder = _.find(storage.folders, {key: folderKey})
if (folder === undefined) return unorderedNotes
const pinnedNotes = unorderedNotes.filter((note) => {
return note.isPinned
Expand Down