1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Desktop: Fixes #8287: Duplicated published notes retain the published note's label's color

This commit is contained in:
Laurent Cozic
2023-06-08 15:09:10 +01:00
parent fb27ae991c
commit 0c6f779aab
2 changed files with 10 additions and 2 deletions

View File

@@ -622,7 +622,14 @@ export default class Note extends BaseItem {
if (!originalNote) throw new Error(`Unknown note: ${noteId}`);
const newNote = { ...originalNote };
const fieldsToReset = ['id', 'created_time', 'updated_time', 'user_created_time', 'user_updated_time'];
const fieldsToReset = [
'id',
'created_time',
'updated_time',
'user_created_time',
'user_updated_time',
'is_shared',
];
for (const field of fieldsToReset) {
delete (newNote as any)[field];