]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/menu/notification.component.ts
Fix invalid margin when loader is not displayed
[github/Chocobozzz/PeerTube.git] / client / src / app / menu / notification.component.ts
index b7d9e9abb4af6e3bb8552cc37bddac09c9d299e5..ac9c7999153e2324c27b3a25d5fc9e2a3e9e284a 100644 (file)
@@ -36,14 +36,14 @@ export class NotificationComponent implements OnInit, OnDestroy {
 
   ngOnInit () {
     this.userNotificationService.countUnreadNotifications()
-        .subscribe(
-          result => {
+        .subscribe({
+          next: result => {
             this.unreadNotifications = Math.min(result, 99) // Limit number to 99
             this.subscribeToNotifications()
           },
 
-          err => this.notifier.error(err.message)
-        )
+          error: err => this.notifier.error(err.message)
+        })
 
     this.routeSub = this.router.events
                         .pipe(filter(event => event instanceof NavigationEnd))