Skip to content

Commit 6a99d0d

Browse files
authored
fix: Timeline view return empty array (#4425)
* fix: Timeline view return empty array * remove logs * Fix * fix
1 parent c6fe465 commit 6a99d0d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/composables/useFollowSpace.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export function useFollowSpace(spaceId: any = {}) {
1818
const loadingFollow = ref('');
1919

2020
const followingSpaces = computed(() =>
21-
following.value.map((f: any) => f.space.id)
21+
Array.isArray(following.value)
22+
? following.value.map((f: any) => f.space.id)
23+
: []
2224
);
2325

2426
const isFollowing = computed(() =>

src/views/TimelineView.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ const isFeedJoinedSpaces = computed(
3535
);
3636
3737
async function getProposals(skip = 0) {
38-
if (!web3Account.value && isFeedJoinedSpaces.value) return [];
38+
if (
39+
isFeedJoinedSpaces.value &&
40+
(!web3Account.value || followingSpaces.value.length < 1)
41+
)
42+
return [];
3943
const spaces = isFeedJoinedSpaces.value ? followingSpaces.value : undefined;
40-
if (!spaces?.length) return [];
4144
const verified = route.query.feed === 'all' ? true : undefined;
4245
4346
return (

0 commit comments

Comments
 (0)