mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Change to use const instead of let
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user