Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Check for undefined moderationOpts (#10224)

authored by

Eric Bailey and committed by
GitHub
d8fdfddb ff30d393

+5 -3
+3 -2
src/features/liveNow/components/LiveStatusDialog.tsx
··· 117 117 const reportDialogControl = useGlobalReportDialogControl() 118 118 const dialogContext = Dialog.useDialogContext() 119 119 const moderation = useMemo(() => { 120 - return moderateStatus(profile, moderationOpts!) 120 + if (!moderationOpts) return undefined 121 + return moderateStatus(profile, moderationOpts) 121 122 }, [profile, moderationOpts]) 122 123 123 124 return ( 124 125 <> 125 126 {embed.external.thumb && ( 126 - <Hider.Outer modui={moderation.ui('contentMedia')}> 127 + <Hider.Outer modui={moderation?.ui('contentMedia')}> 127 128 <Hider.Mask> 128 129 <ModeratedImage /> 129 130 </Hider.Mask>
+2 -1
src/features/liveNow/index.tsx
··· 100 100 101 101 const moderation = useMemo(() => { 102 102 if (!actor || !('status' in actor && actor.status)) return undefined 103 - return moderateStatus(actor, moderationOpts!) 103 + if (!moderationOpts) return undefined 104 + return moderateStatus(actor, moderationOpts) 104 105 }, [actor, moderationOpts]) 105 106 106 107 return useMemo(() => {