aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-10-10 19:49:04 -0700
committerAdam Soltys <[email protected]>2024-10-10 19:49:04 -0700
commit2ac0611376e8aa31d891d4c190e530068a479570 (patch)
tree4f29a8e06c5e08b664db5adff331f40c5b7b9e0e /src
parentd8531773ea37858fef3adee5f917256c9c2cb492 (diff)
downloadcoinos-ui-2ac0611376e8aa31d891d4c190e530068a479570.tar.gz
coinos-ui-2ac0611376e8aa31d891d4c190e530068a479570.zip
fix profile pages
Diffstat (limited to 'src')
-rw-r--r--src/routes/(app)/[username]/(profile)/+layout.server.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+layout.server.ts b/src/routes/(app)/[username]/(profile)/+layout.server.ts
index 9ad95fa6..f9f1a55f 100644
--- a/src/routes/(app)/[username]/(profile)/+layout.server.ts
+++ b/src/routes/(app)/[username]/(profile)/+layout.server.ts
@@ -6,7 +6,9 @@ export async function load({ depends, parent }) {
let { subject, user } = await parent();
let { follows, followers } = await get(`/${subject.pubkey}/count`);
- let followList = get(`/${user.pubkey}/follows?tagsonly=true`).catch(() => []);
+ let followList = new Promise((r) => r([]));
+ if (user)
+ followList = get(`/${user.pubkey}/follows?tagsonly=true`).catch(() => []);
return { follows, followers, followList };
}