aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/data
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-08 22:51:01 +0800
committercrupest <crupest@outlook.com>2020-08-08 22:51:01 +0800
commit63920dcf97ef19d036fa364e54be15193c5a8239 (patch)
tree27d0de2411c8a089895a608f4dc395da96d30ed5 /Timeline/ClientApp/src/app/data
parent1eb0fe83a57834348d51639ac840850e380ca81f (diff)
downloadtimeline-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.ts7
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))