diff options
| author | crupest <crupest@outlook.com> | 2020-08-08 22:51:01 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2020-08-08 22:51:01 +0800 |
| commit | 63920dcf97ef19d036fa364e54be15193c5a8239 (patch) | |
| tree | 27d0de2411c8a089895a608f4dc395da96d30ed5 /Timeline/ClientApp/src/app/data | |
| parent | 1eb0fe83a57834348d51639ac840850e380ca81f (diff) | |
| download | timeline-63920dcf97ef19d036fa364e54be15193c5a8239.tar.gz timeline-63920dcf97ef19d036fa364e54be15193c5a8239.tar.bz2 timeline-63920dcf97ef19d036fa364e54be15193c5a8239.zip | |
Fix bugs.
Diffstat (limited to 'Timeline/ClientApp/src/app/data')
| -rw-r--r-- | Timeline/ClientApp/src/app/data/timeline.ts | 7 |
1 files changed, 7 insertions, 0 deletions
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<TimelinePostsWithSyncState> {
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))
|
