fixed bug in retrieving videos for subscription when name was not present

This commit is contained in:
Isaac Grynsztein
2020-03-05 21:18:36 -05:00
parent 3d2e138f50
commit 41bfc80c4e
3 changed files with 17 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ export class SubscriptionsComponent implements OnInit {
getSubscriptions() {
this.subscriptions_loading = true;
this.subscriptions = [];
this.subscriptions = null;
this.channel_subscriptions = [];
this.playlist_subscriptions = [];
this.postsService.getAllSubscriptions().subscribe(res => {
@@ -43,6 +43,10 @@ export class SubscriptionsComponent implements OnInit {
this.channel_subscriptions.push(sub);
}
}
}, err => {
this.subscriptions_loading = false;
console.error('Failed to get subscriptions');
this.openSnackBar('ERROR: Failed to get subscriptions!', 'OK.');
});
}