From 935cc8f67572fe140847c106a80babfb68152fe5 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 5 Dec 2022 13:36:13 -0600 Subject: [PATCH] Fix: never attempt update on 0 items --- src/state/models/feed-view.ts | 3 +++ src/state/models/notifications-view.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts index 33db426a45..f5dce9e05e 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 e81f31a254..f820c71b7c 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