1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 18:26:26 +00:00

Merge pull request #1329 from robbawebba/fix/jump-notes-by-link

Fix linking to other notes
This commit is contained in:
Kazz Yokomizo
2017-12-26 11:51:51 +09:00
committed by GitHub

View File

@@ -235,18 +235,8 @@ class NoteList extends React.Component {
return
}
const { router } = this.context
const { location } = this.props
let targetIndex = this.getTargetIndex()
if (targetIndex < 0) targetIndex = 0
const selectedNoteKeys = []
const nextNoteKey = this.getNoteKeyFromTargetIndex(targetIndex)
selectedNoteKeys.push(nextNoteKey)
this.focusNote(selectedNoteKeys, nextNoteKey)
const selectedNoteKeys = [noteHash]
this.focusNote(selectedNoteKeys, noteHash)
ee.emit('list:moved')
}