1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Adjust find function

Co-Authored-By: dredav <dredav@users.noreply.github.com>
This commit is contained in:
Nguyen Viet Hung
2019-03-23 14:51:28 +01:00
committed by Junyoung Choi
parent 91d04b99d1
commit 5b99132f66

View File

@@ -269,7 +269,7 @@ class NoteList extends React.Component {
const selectedNoteKeys = [noteHash]
let locationToSelect = '/home'
const noteByHash = data.noteMap.map((note) => note).find(note => { return note.key === noteHash })
const noteByHash = data.noteMap.map((note) => note).find(note => note.key === noteHash)
if (noteByHash !== undefined) {
locationToSelect = '/storages/' + noteByHash.storage + '/folders/' + noteByHash.folder
}