Skip to content

Commit

Permalink
add default to reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterjm authored and blakeblackshear committed Jun 10, 2021
1 parent 78a0b5e commit eb3f50c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/components/RecordingPlaylist.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function EventCard({ camera, event, delay }) {
const position = differenceInSeconds(start, startOfHour(start));
const offset = Object.entries(delay)
.map(([p, d]) => (position > p ? d : 0))
.reduce((p, c) => p + c);
.reduce((p, c) => p + c, 0);
const seconds = Math.max(position - offset - 10, 0);
return (
<Link className="" href={`/recording/${camera}/${format(start, 'yyyy-MM-dd')}/${format(start, 'HH')}/${seconds}`}>
Expand Down

0 comments on commit eb3f50c

Please sign in to comment.