Skip to content

Commit 494fef6

Browse files
committed
fix: fix sys overwrite when copying files
1 parent 8338a2f commit 494fef6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/chilled-poems-walk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@blinkk/root-cms': patch
3+
---
4+
5+
fix: fix sys overwrite when copying files

packages/root-cms/ui/utils/doc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ export async function cmsCreateDoc(
490490
};
491491

492492
// Preserve "sys" values when copying and overwriting a doc.
493-
if (doc.exists() && !options?.overwrite) {
493+
if (doc.exists() && options?.overwrite) {
494494
const oldData = doc.data();
495495
data.sys = {
496496
...oldData.sys,

0 commit comments

Comments
 (0)