Skip to content

Commit 2050d5e

Browse files
committed
Fix url preview
1 parent 5f09a44 commit 2050d5e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

admin/src/api/post/content-types/post/lifecycles.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ async function generatePreview(event) {
271271
-webkit-box-orient:vertical;
272272
"
273273
>
274-
${data.title || ""}
274+
${data?.title || ""}
275275
</h2>
276276
<div style="margin-top: 8px">
277277
<h3
@@ -287,7 +287,7 @@ async function generatePreview(event) {
287287
-webkit-box-orient:vertical;
288288
"
289289
>
290-
${data.description || ""}
290+
${data?.description || ""}
291291
</h3>
292292
</div>
293293
<div>
@@ -302,14 +302,14 @@ async function generatePreview(event) {
302302
text-overflow: ellipsis;
303303
"
304304
>
305-
${data.domain || ""}
305+
${data?.domain || ""}
306306
</p>
307307
</div>
308308
</div>
309309
<div style="width: 160px">
310310
<div
311311
style="
312-
background-image: url('${data.img || ""}');
312+
background-image: url('${data?.img || ""}');
313313
background-position: 50% 50%;
314314
height: 167px;
315315
width: 160px;

0 commit comments

Comments
 (0)