From 282c28754a7225fb7f53aa7dfb7598fd54d2db88 Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 8 Aug 2020 22:51:01 +0800 Subject: Fix bugs. --- Timeline/ClientApp/src/app/data/timeline.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Timeline/ClientApp/src/app/data') diff --git a/Timeline/ClientApp/src/app/data/timeline.ts b/Timeline/ClientApp/src/app/data/timeline.ts index 52022562..842d4bee 100644 --- a/Timeline/ClientApp/src/app/data/timeline.ts +++ b/Timeline/ClientApp/src/app/data/timeline.ts @@ -371,6 +371,13 @@ export class TimelineService { getPosts$(timelineName: string): Observable { return this._postsHub.getObservable(timelineName).pipe( switchMap((state) => { + if (state.posts.length === 0) { + return of({ + type: state.type, + posts: [], + }); + } + return combineLatest([ combineLatest( state.posts.map((post) => userInfoService.getUser$(post.author)) -- cgit v1.2.3