- let pagination = { currentPage: page, itemsPerPage: this.pageSize + 1 }
- if (!recommendation.tags) {
- return this.videos.getVideos(pagination, '-createdAt')
- .pipe(
- map(v => v.videos)
- )
- }
- if (recommendation.tags.length === 0) {
- return this.videos.getVideos(pagination, '-createdAt')
- .pipe(
- map(v => v.videos)
- )
- }
+ const pagination = { currentPage: page, itemsPerPage: this.pageSize + 1 }
+ const defaultSubscription = this.videos.getVideos(pagination, '-createdAt')
+ .pipe(map(v => v.videos))
+
+ if (!recommendation.tags || recommendation.tags.length === 0) return defaultSubscription
+