Skip to content

Commit c5b1dfe

Browse files
starkoviodemshy
andauthored
fix(#7371): Duplicate Localized Content When Duplicating Entries with i18n Enabled (#7372)
* chore: add i18n to EntryObject type * fix: draftDuplicateEntry function duplicate i18n data --------- Co-authored-by: Anze Demsar <anze.demsar@p-m.si>
1 parent 86d41d7 commit c5b1dfe

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/decap-cms-core/src/actions/entries.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ export function draftDuplicateEntry(entry: EntryMap) {
389389
type: DRAFT_CREATE_DUPLICATE_FROM_ENTRY,
390390
payload: createEntry(entry.get('collection'), '', '', {
391391
data: entry.get('data'),
392+
i18n: entry.get('i18n'),
392393
mediaFiles: entry.get('mediaFiles').toJS(),
393394
}),
394395
};

packages/decap-cms-core/src/types/redux.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,8 @@ export type EntryObject = {
527527
slug: string;
528528
// eslint-disable-next-line @typescript-eslint/no-explicit-any
529529
data: any;
530+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
531+
i18n?: any;
530532
collection: string;
531533
mediaFiles: List<MediaFileMap>;
532534
newRecord: boolean;

0 commit comments

Comments
 (0)