Skip to content

Commit

Permalink
fix: fix reference field when doc is deleted (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenle authored Sep 18, 2024
1 parent f1293f1 commit 2b27a86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/silver-roses-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@blinkk/root-cms': patch
---

fix: fix reference field when doc is deleted
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,13 @@ ReferenceField.Preview = (props: ReferencePreviewProps) => {
<div className="ReferenceField__Preview__loading">
<Loader color="gray" size="sm" />
</div>
) : (
) : previewDoc ? (
<ReferenceField.DocCard doc={previewDoc} />
) : (
<div className="ReferenceField__Preview__notfound">
Doc Not found: "{props.id}" (was it deleted?). Select a new doc or
remove using the trash icon to the right.
</div>
)}
</div>
);
Expand Down

0 comments on commit 2b27a86

Please sign in to comment.