Fix: never attempt update on 0 items

zio/stable
Paul Frazee 2022-12-05 13:36:13 -06:00
parent 26b2797e2c
commit 65e5f2ac86
2 changed files with 6 additions and 0 deletions

View File

@ -381,6 +381,9 @@ export class FeedModel {
} }
private async _update() { private async _update() {
if (!this.feed.length) {
return
}
this._xLoading() this._xLoading()
let numToFetch = this.feed.length let numToFetch = this.feed.length
let cursor = undefined let cursor = undefined

View File

@ -317,6 +317,9 @@ export class NotificationsViewModel {
} }
private async _update() { private async _update() {
if (!this.notifications.length) {
return
}
this._xLoading() this._xLoading()
let numToFetch = this.notifications.length let numToFetch = this.notifications.length
let cursor = undefined let cursor = undefined