Skip to content

Commit

Permalink
Handle case of removed camera
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Jun 10, 2024
1 parent 3986526 commit b88ab85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/components/card/AnimatedEventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export function AnimatedEventCard({
// image behavior

const aspectRatio = useMemo(() => {
if (!config) {
return 1;
if (!config || !Object.keys(config.cameras).includes(event.camera)) {
return 16 / 9;
}

const detect = config.cameras[event.camera].detect;
Expand Down

0 comments on commit b88ab85

Please sign in to comment.