Migrate to isValidRecord in threadgate/util
This commit is contained in:
@@ -6,9 +6,7 @@ export function threadgateViewToAllowUISetting(
|
|||||||
threadgateView: AppBskyFeedDefs.ThreadgateView | undefined,
|
threadgateView: AppBskyFeedDefs.ThreadgateView | undefined,
|
||||||
): ThreadgateAllowUISetting[] {
|
): ThreadgateAllowUISetting[] {
|
||||||
const threadgate =
|
const threadgate =
|
||||||
threadgateView &&
|
threadgateView && AppBskyFeedThreadgate.isValidRecord(threadgateView.record)
|
||||||
AppBskyFeedThreadgate.isRecord(threadgateView.record) &&
|
|
||||||
AppBskyFeedThreadgate.validateRecord(threadgateView.record).success
|
|
||||||
? threadgateView.record
|
? threadgateView.record
|
||||||
: undefined
|
: undefined
|
||||||
return threadgateRecordToAllowUISetting(threadgate)
|
return threadgateRecordToAllowUISetting(threadgate)
|
||||||
|
|||||||
Reference in New Issue
Block a user