Skip to content

Commit 86d41d7

Browse files
authored
fix(nested-i18n): pass newPath only when customPath differs from current path (decaporg#7418)
1 parent d10b984 commit 86d41d7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/decap-cms-core/src/backend.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,12 +1128,13 @@ export class Backend {
11281128
updateAssetProxies(assetProxies, config, collection, entryDraft, path);
11291129
} else {
11301130
const slug = entryDraft.getIn(['entry', 'slug']);
1131+
const path = entryDraft.getIn(['entry', 'path']);
11311132
dataFile = {
1132-
path: entryDraft.getIn(['entry', 'path']),
1133+
path,
11331134
// for workflow entries we refresh the slug on publish
11341135
slug: customPath && !useWorkflow ? slugFromCustomPath(collection, customPath) : slug,
11351136
raw: this.entryToRaw(collection, entryDraft.get('entry')),
1136-
newPath: customPath,
1137+
newPath: customPath === path ? undefined : customPath,
11371138
};
11381139
}
11391140

0 commit comments

Comments
 (0)