mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-01 18:31:35 +00:00
Show followers not available message instead of 0
This commit is contained in:
parent
a45142a02d
commit
69585a18ec
3 changed files with 17 additions and 10 deletions
|
|
@ -68,8 +68,9 @@ module.exports = [
|
|||
if (typeof page === "number" && !isNaN(page) && page >= 1) {
|
||||
await user.timeline.fetchUpToPage(page - 1)
|
||||
}
|
||||
const followerCountsAvailable = !(user.constructor.name === "ReelUser" && user.following === 0 && user.followedBy === 0)
|
||||
const {website_origin, settings: {display_feed_validation_buttons}} = constants
|
||||
return render(200, "pug/user.pug", {url, user, constants, website_origin, display_feed_validation_buttons})
|
||||
return render(200, "pug/user.pug", {url, user, followerCountsAvailable, constants, website_origin, display_feed_validation_buttons})
|
||||
}).catch(error => {
|
||||
if (error === constants.symbols.NOT_FOUND || error === constants.symbols.ENDPOINT_OVERRIDDEN) {
|
||||
return render(404, "pug/friendlyerror.pug", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue