From c60346b0fa653b1456c14897bb7f8d50e7c665fb Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 5 Feb 2025 11:20:13 -0600 Subject: [PATCH] Use dangerousIsType --- src/screens/VideoFeed/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/screens/VideoFeed/index.tsx b/src/screens/VideoFeed/index.tsx index 88a83b45cf..e36132a162 100644 --- a/src/screens/VideoFeed/index.tsx +++ b/src/screens/VideoFeed/index.tsx @@ -90,6 +90,7 @@ import {ListFooter} from '#/components/Lists' import * as Hider from '#/components/moderation/Hider' import {RichText} from '#/components/RichText' import {Text} from '#/components/Typography' +import * as atp from '#/types/atproto' import {Scrubber, VIDEO_PLAYER_BOTTOM_INSET} from './components/Scrubber' function createThreeVideoPlayers( @@ -694,7 +695,12 @@ function Overlay({ ) const rkey = new AtUri(post.uri).rkey - const record = AppBskyFeedPost.isRecord(post.record) ? post.record : undefined + const record = atp.dangerousIsType( + post.record, + AppBskyFeedPost.isRecord, + ) + ? post.record + : undefined const richText = new RichTextAPI({ text: record?.text || '', facets: record?.facets,