File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
admin/src/api/post/content-types/post Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,9 @@ async function generatePreview(event) {
245
245
box-shadow: rgb(242, 242, 242) 0px 0px 0px 1px inset;
246
246
"
247
247
>
248
- <a href="${ element . attributes . url . value } " target="_blank" style="text-decoration: none; ">
248
+ <a href="${
249
+ element . attributes . url . value
250
+ } " target="_blank" style="text-decoration: none; ">
249
251
<div style="display: flex">
250
252
<div
251
253
style="
@@ -269,7 +271,7 @@ async function generatePreview(event) {
269
271
-webkit-box-orient:vertical;
270
272
"
271
273
>
272
- ${ data . title }
274
+ ${ data ? .title || "" }
273
275
</h2>
274
276
<div style="margin-top: 8px">
275
277
<h3
@@ -285,7 +287,7 @@ async function generatePreview(event) {
285
287
-webkit-box-orient:vertical;
286
288
"
287
289
>
288
- ${ data . description }
290
+ ${ data ? .description || "" }
289
291
</h3>
290
292
</div>
291
293
<div>
@@ -300,14 +302,14 @@ async function generatePreview(event) {
300
302
text-overflow: ellipsis;
301
303
"
302
304
>
303
- ${ data . domain }
305
+ ${ data ? .domain || "" }
304
306
</p>
305
307
</div>
306
308
</div>
307
309
<div style="width: 160px">
308
310
<div
309
311
style="
310
- background-image: url('${ data . img } ');
312
+ background-image: url('${ data ? .img || "" } ');
311
313
background-position: 50% 50%;
312
314
height: 167px;
313
315
width: 160px;
You can’t perform that action at this time.
0 commit comments