diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-04-15 20:41:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-15 20:41:44 -0700 |
commit | 68d002a966650fb77a2173f5004c70d430bc3f55 (patch) | |
tree | c13ce98be1216056038f24343ed9e823f942f069 | |
parent | f265d65a189b9083857844331d18bdf56403ff69 (diff) | |
download | voidsky-68d002a966650fb77a2173f5004c70d430bc3f55.tar.zst |
Fix error getting through by primary feed sort (#3562)
-rw-r--r-- | src/screens/Onboarding/util.ts | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/screens/Onboarding/util.ts b/src/screens/Onboarding/util.ts index 1a0b8d21b..6b12fb38f 100644 --- a/src/screens/Onboarding/util.ts +++ b/src/screens/Onboarding/util.ts @@ -107,21 +107,15 @@ async function whenFollowsIndexed( } /** - * Kinda hacky, but we want For Your or Discover to appear as the first pinned + * Kinda hacky, but we want Discover to appear as the first pinned * feed after Following */ export function sortPrimaryAlgorithmFeeds(uris: string[]) { return uris.sort((a, b) => { - if (a === PRIMARY_FEEDS[0].uri) { + if (a === PRIMARY_FEEDS[0]?.uri) { return -1 } - if (b === PRIMARY_FEEDS[0].uri) { - return 1 - } - if (a === PRIMARY_FEEDS[1].uri) { - return -1 - } - if (b === PRIMARY_FEEDS[1].uri) { + if (b === PRIMARY_FEEDS[0]?.uri) { return 1 } return a.localeCompare(b) |