1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Fix delete last note

This commit is contained in:
syossan27
2016-07-29 13:03:11 +09:00
parent 7fbe456e79
commit e256c7a7d9

View File

@@ -107,11 +107,12 @@ class NoteList extends React.Component {
})
if (targetIndex === this.notes.length - 1) {
return
targetIndex = 0
} else {
targetIndex++
if (targetIndex < 0) targetIndex = 0
else if (targetIndex > this.notes.length - 1) targetIndex === this.notes.length - 1
}
targetIndex++
if (targetIndex < 0) targetIndex = 0
else if (targetIndex > this.notes.length - 1) targetIndex === this.notes.length - 1
router.push({
pathname: location.pathname,