mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
set updatedAt when dispatching SAVE_NOTE
This commit is contained in:
@@ -125,6 +125,7 @@ function repositories (state = initialRepositories, action) {
|
|||||||
if (targetRepo == null) return state
|
if (targetRepo == null) return state
|
||||||
|
|
||||||
let targetNoteIndex = _.findIndex(targetRepo.notes, {key: action.note.key})
|
let targetNoteIndex = _.findIndex(targetRepo.notes, {key: action.note.key})
|
||||||
|
action.note.updatedAt = Date.now()
|
||||||
if (targetNoteIndex > -1) {
|
if (targetNoteIndex > -1) {
|
||||||
targetRepo.notes.splice(targetNoteIndex, 1, action.note)
|
targetRepo.notes.splice(targetNoteIndex, 1, action.note)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user