Fix some Sentry reported crashes

This commit is contained in:
xmflsct 2023-01-16 18:56:15 +01:00
parent 18ad22302d
commit 74e794a215
2 changed files with 5 additions and 3 deletions

View File

@ -60,7 +60,7 @@ const Collections: React.FC = () => {
title={t('screenTabs:me.stacks.favourites.name')} title={t('screenTabs:me.stacks.favourites.name')}
onPress={() => navigation.navigate('Tab-Me-Favourites')} onPress={() => navigation.navigate('Tab-Me-Favourites')}
/> />
{pageMe.lists?.shown ? ( {pageMe?.lists?.shown ? (
<MenuRow <MenuRow
iconFront='List' iconFront='List'
iconBack='ChevronRight' iconBack='ChevronRight'
@ -68,7 +68,7 @@ const Collections: React.FC = () => {
onPress={() => navigation.navigate('Tab-Me-List-List')} onPress={() => navigation.navigate('Tab-Me-List-List')}
/> />
) : null} ) : null}
{pageMe.followedTags?.shown ? ( {pageMe?.followedTags?.shown ? (
<MenuRow <MenuRow
iconFront='Hash' iconFront='Hash'
iconBack='ChevronRight' iconBack='ChevronRight'
@ -76,7 +76,7 @@ const Collections: React.FC = () => {
onPress={() => navigation.navigate('Tab-Me-FollowedTags')} onPress={() => navigation.navigate('Tab-Me-FollowedTags')}
/> />
) : null} ) : null}
{pageMe.announcements?.shown ? ( {pageMe?.announcements?.shown ? (
<MenuRow <MenuRow
iconFront='Clipboard' iconFront='Clipboard'
iconBack='ChevronRight' iconBack='ChevronRight'

View File

@ -1,6 +1,8 @@
import * as htmlparser2 from 'htmlparser2' import * as htmlparser2 from 'htmlparser2'
const removeHTML = (text: string): string => { const removeHTML = (text: string): string => {
if (!text) return ''
let raw: string = '' let raw: string = ''
const parser = new htmlparser2.Parser({ const parser = new htmlparser2.Parser({