diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-12-05 13:36:13 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-12-05 13:36:13 -0600 |
commit | 65e5f2ac863756335070377813817fa87c94d262 (patch) | |
tree | 1e2abe3656e87c68424d32eaceca7c93a2e3c2ec /src | |
parent | 26b2797e2cd8f51750668d47f3dbccd4c851dc8b (diff) | |
download | voidsky-65e5f2ac863756335070377813817fa87c94d262.tar.zst |
Fix: never attempt update on 0 items
Diffstat (limited to 'src')
-rw-r--r-- | src/state/models/feed-view.ts | 3 | ||||
-rw-r--r-- | src/state/models/notifications-view.ts | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts index 33db426a4..f5dce9e05 100644 --- a/src/state/models/feed-view.ts +++ b/src/state/models/feed-view.ts @@ -381,6 +381,9 @@ export class FeedModel { } private async _update() { + if (!this.feed.length) { + return + } this._xLoading() let numToFetch = this.feed.length let cursor = undefined diff --git a/src/state/models/notifications-view.ts b/src/state/models/notifications-view.ts index e81f31a25..f820c71b7 100644 --- a/src/state/models/notifications-view.ts +++ b/src/state/models/notifications-view.ts @@ -317,6 +317,9 @@ export class NotificationsViewModel { } private async _update() { + if (!this.notifications.length) { + return + } this._xLoading() let numToFetch = this.notifications.length let cursor = undefined |