Skip to content

Commit

Permalink
Fix crash when opening / closing event feeds (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnyjth authored Feb 22, 2024
1 parent 6749e7e commit 326fa09
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/web-shared/components/ContentChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function ContentChannel(props = {}) {
title={item.node.title}
summary={item.node.summary}
onClick={() => handleActionPress(item)}
videoMedia={item.relatedNode?.videos[0]}
videoMedia={item.relatedNode?.videos?.[0]}
/>
);
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function VerticalCardListFeature(props = {}) {
if (item.action === 'OPEN_URL') {
analytics.track('OpenUrl', {
url: item?.relatedNode?.url,
});
});
return window.open(getURLFromType(item.relatedNode), '_blank');
}

Expand Down Expand Up @@ -97,7 +97,7 @@ function VerticalCardListFeature(props = {}) {
title={item.title}
summary={item.summary}
onClick={() => handleActionPress(item)}
videoMedia={item.relatedNode?.videos[0]}
videoMedia={item.relatedNode?.videos?.[0]}
/>
))}
</Styled.Container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function FeatureFeedListGrid(props = {}) {
title={item.title}
summary={item.summary}
onClick={() => handleActionPress(item)}
videoMedia={item.relatedNode?.videos[0]}
videoMedia={item.relatedNode?.videos?.[0]}
channelLabel={item.relatedNode?.parentItem?.title}
/>
))}
Expand Down

0 comments on commit 326fa09

Please sign in to comment.