Skip to content

Commit

Permalink
Fixed check
Browse files Browse the repository at this point in the history
  • Loading branch information
Malavika Koppula committed Mar 26, 2024
1 parent 50188ff commit 1be2ee1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blocks/lead-art-block/features/leadart/default.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export const LeadArtPresentation = (props) => {
const leadArtContent = getLeadArtContent(lead_art);

useEffect(() => {
if(leadArtContent.type === "image"){
if(leadArtContent?.type === "image"){
if (document.fullscreenEnabled) {
document.addEventListener("fullscreenchange", () => {
if (!document.fullscreenElement) {
Expand All @@ -279,7 +279,7 @@ export const LeadArtPresentation = (props) => {
}
}
}, [leadArtContent]);

if (leadArtContent) {
return <div className={BLOCK_CLASS_NAME}>{leadArtContent}</div>;
}
Expand Down

0 comments on commit 1be2ee1

Please sign in to comment.