Skip to content

Commit

Permalink
fix error for missing background
Browse files Browse the repository at this point in the history
  • Loading branch information
stCarolas committed Mar 23, 2024
1 parent 168d569 commit ae4d4f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/Reel/ReelWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ export default function ReelWidget({}) {
if (highlight && active === option){
style.backgroundColor = selectionColor;
} else {
style.backgroundSize = "cover";
style.backgroundImage = `url(${process.env.REACT_APP_FILE_API_ENDPOINT}/files/${backgroundImage})`;
if (backgroundImage) {
style.backgroundSize = "cover";
style.backgroundImage = `url(${process.env.REACT_APP_FILE_API_ENDPOINT}/files/${backgroundImage})`;
}
}
log.debug({style}, "calculated style for slide item");
return style;
Expand Down

0 comments on commit ae4d4f5

Please sign in to comment.