You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-12 22:57:38 +02:00
All: Reset time fields when duplicating a note (#2428)
This commit is contained in:
@ -511,7 +511,11 @@ class Note extends BaseItem {
|
||||
if (!originalNote) throw new Error(`Unknown note: ${noteId}`);
|
||||
|
||||
let newNote = Object.assign({}, originalNote);
|
||||
delete newNote.id;
|
||||
const fieldsToReset = ['id', 'created_time', 'updated_time', 'user_created_time', 'user_updated_time'];
|
||||
|
||||
for (let field of fieldsToReset) {
|
||||
delete newNote[field];
|
||||
}
|
||||
|
||||
for (let n in changes) {
|
||||
if (!changes.hasOwnProperty(n)) continue;
|
||||
|
Reference in New Issue
Block a user