Skip to content

Commit fed4be0

Browse files
committed
prefer using spreadng
1 parent b288d9c commit fed4be0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/components/micropost-list/micropost-list.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class MicropostListComponent implements OnInit {
5050
private list(maxId: number|null = null): void {
5151
this.userMicropostService.list(this.userId, {maxId: maxId, count: 5})
5252
.subscribe(posts => {
53-
this.posts = this.posts.concat(posts);
53+
this.posts = [...this.posts, ...posts];
5454
this.noMorePosts = posts.length === 0;
5555
}, e => this.errorHandler.handle(e))
5656
;

src/app/pages/+related-user-list/related-user-list.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export abstract class RelatedUserListComponent implements OnInit {
3737

3838
private list(maxId: number|null): void {
3939
this.listProvider(maxId).subscribe(relatedUsers => {
40-
this.relatedUsers = this.relatedUsers.concat(relatedUsers);
40+
this.relatedUsers = [...this.relatedUsers, ...relatedUsers];
4141
this.noMoreUsers = relatedUsers.length === 0;
4242
}, e => this.errorHandler.handle(e));
4343
}

0 commit comments

Comments
 (0)