about summary refs log tree commit diff
path: root/src/lib/api/feed/custom.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-12-12 13:07:09 -0800
committerGitHub <noreply@github.com>2023-12-12 13:07:09 -0800
commit870505cbe23a04aeece902943e335c6e78ab5d8b (patch)
treeadf63122bc8c71e29c61b0fcaa19ea7930c36fd9 /src/lib/api/feed/custom.ts
parent90647fe7cf41d5dd66b6df64910bf7d481548d6b (diff)
downloadvoidsky-870505cbe23a04aeece902943e335c6e78ab5d8b.tar.zst
Go back to content-driven slice keys in feeds (#2190)
* Go back to deterministic react keys

* Quick fix to cases when custom feeds serve empty responses
Diffstat (limited to 'src/lib/api/feed/custom.ts')
-rw-r--r--src/lib/api/feed/custom.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/api/feed/custom.ts b/src/lib/api/feed/custom.ts
index 47ffc65ed..94cbff130 100644
--- a/src/lib/api/feed/custom.ts
+++ b/src/lib/api/feed/custom.ts
@@ -37,7 +37,7 @@ export class CustomFeedAPI implements FeedAPI {
         res.data.feed = res.data.feed.slice(0, limit)
       }
       return {
-        cursor: res.data.cursor,
+        cursor: res.data.feed.length ? res.data.cursor : undefined,
         feed: res.data.feed,
       }
     }