diff --git a/app/soapbox/features/scheduled-statuses/components/scheduled-status.tsx b/app/soapbox/features/scheduled-statuses/components/scheduled-status.tsx index 1d1a68c947..cca79ffd48 100644 --- a/app/soapbox/features/scheduled-statuses/components/scheduled-status.tsx +++ b/app/soapbox/features/scheduled-statuses/components/scheduled-status.tsx @@ -20,7 +20,12 @@ interface IScheduledStatus { } const ScheduledStatus: React.FC = ({ statusId, ...other }) => { - const status = useAppSelector((state) => buildStatus(state, state.scheduled_statuses.get(statusId)!)) as StatusEntity; + const status = useAppSelector((state) => { + const scheduledStatus = state.scheduled_statuses.get(statusId); + + if (!scheduledStatus) return null; + return buildStatus(state, scheduledStatus); + }) as StatusEntity | null; if (!status) return null;