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 | 282c28754a7225fb7f53aa7dfb7598fd54d2db88 (patch) | |
tree | 6326e2482fb1a6480e13daa584bae44e71e458b5 /Timeline/ClientApp/src/app/data | |
parent | 6d5a9ba1c220a899aa239521e0ba699419583595 (diff) | |
download | timeline-282c28754a7225fb7f53aa7dfb7598fd54d2db88.tar.gz timeline-282c28754a7225fb7f53aa7dfb7598fd54d2db88.tar.bz2 timeline-282c28754a7225fb7f53aa7dfb7598fd54d2db88.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))
|