Skip to content

Commit

Permalink
Fixes crash when permission is taken away. (#851)
Browse files Browse the repository at this point in the history
  • Loading branch information
cimigree authored and ErikSin committed Nov 25, 2024
1 parent b0a72b0 commit b6fc3f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/frontend/hooks/useFormattedTimeSince.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Duration} from 'luxon';

export const useFormattedTimeSince = (start: Date | null, interval: number) => {
const [currentTime, setCurrentTime] = useState(new Date());
let startDate = start ? start : new Date();
let startDate = start ? new Date(start) : new Date();

useEffect(() => {
setCurrentTime(new Date());
Expand Down

0 comments on commit b6fc3f3

Please sign in to comment.