We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91ff0d9 commit d199c37Copy full SHA for d199c37
1 file changed
src/lib/utils/api.ts
@@ -74,6 +74,11 @@ export class ContentWrapper {
74
res[id] = documentToHtmlString(res[id], {
75
renderNode: {
76
[BLOCKS.EMBEDDED_ASSET]: (node) => {
77
+ // Add this safety check: If the asset was deleted/unpublished, skip it.
78
+ if (!node.data?.target?.fields) {
79
+ return "";
80
+ }
81
+
82
const { file, title, description } =
83
node.data.target.fields;
84
return `
0 commit comments