You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
All: Reducer should not mutate state
This commit is contained in:
@@ -467,14 +467,14 @@ function handleHistory(state, action) {
|
|||||||
|
|
||||||
backwardHistoryNotes = backwardHistoryNotes.map(note => {
|
backwardHistoryNotes = backwardHistoryNotes.map(note => {
|
||||||
if (note.id === modNote.id) {
|
if (note.id === modNote.id) {
|
||||||
return Object.assign(note, { parent_id: modNote.parent_id, selectedFolderId: modNote.parent_id });
|
return Object.assign({}, note, { parent_id: modNote.parent_id, selectedFolderId: modNote.parent_id });
|
||||||
}
|
}
|
||||||
return note;
|
return note;
|
||||||
});
|
});
|
||||||
|
|
||||||
forwardHistoryNotes = forwardHistoryNotes.map(note => {
|
forwardHistoryNotes = forwardHistoryNotes.map(note => {
|
||||||
if (note.id === modNote.id) {
|
if (note.id === modNote.id) {
|
||||||
return Object.assign(note, { parent_id: modNote.parent_id, selectedFolderId: modNote.parent_id });
|
return Object.assign({}, note, { parent_id: modNote.parent_id, selectedFolderId: modNote.parent_id });
|
||||||
}
|
}
|
||||||
return note;
|
return note;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user