Skip to content

Commit

Permalink
Remove nullable check in onPageSelecting, assume the pager checks bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed May 10, 2024
1 parent 616546b commit e375aa8
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/view/screens/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,12 @@ function HomeScreenReady({
const onPageSelecting = React.useCallback(
(index: number, reason: LogEvents['home:feedDisplayed']['reason']) => {
const feed = allFeeds[index]

if (feed) {
logEvent('home:feedDisplayed', {
index,
feedType: feed.split('|')[0],
feedUrl: feed,
reason,
})
}
logEvent('home:feedDisplayed', {
index,
feedType: feed.split('|')[0],
feedUrl: feed,
reason,
})
},
[allFeeds],
)
Expand Down

0 comments on commit e375aa8

Please sign in to comment.