Skip to content

Commit

Permalink
fix: fix sys overwrite when copying files
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenle committed Aug 27, 2024
1 parent 8338a2f commit 494fef6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilled-poems-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@blinkk/root-cms': patch
---

fix: fix sys overwrite when copying files
2 changes: 1 addition & 1 deletion packages/root-cms/ui/utils/doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ export async function cmsCreateDoc(
};

// Preserve "sys" values when copying and overwriting a doc.
if (doc.exists() && !options?.overwrite) {
if (doc.exists() && options?.overwrite) {
const oldData = doc.data();
data.sys = {
...oldData.sys,
Expand Down

0 comments on commit 494fef6

Please sign in to comment.