Skip to content

Commit 5f68466

Browse files
Checking for renditionLinks before searching to prevent TypeError (not all asset types have renditionLinks) (#482)
1 parent 71b6039 commit 5f68466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

blocks/edit/da-assets/da-assets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export async function openAssets() {
9898

9999
// eslint-disable-next-line no-underscore-dangle
100100
const renditionLinks = asset._links['http://ns.adobe.com/adobecloud/rel/rendition'];
101-
const videoLink = renditionLinks.find((link) => link.href.endsWith('/play'))?.href;
101+
const videoLink = renditionLinks?.find((link) => link.href.endsWith('/play'))?.href;
102102

103103
let src;
104104
if (aemTierType === 'author') {

0 commit comments

Comments
 (0)