@indice/ng-components 0.2.159-beta.3 → 0.2.159-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2083,17 +2083,21 @@ class NotificationsIndicatorComponent {
2083
2083
  }
2084
2084
  }
2085
2085
  ngOnInit() {
2086
- this.links['notifications'].subscribe(notificationsLink => {
2087
- this.allNotificationsLink = notificationsLink;
2088
- });
2089
- this.notificationsSub$ = this.notifications?.messages.subscribe(result => {
2090
- if (result.items) {
2091
- this.newArrival = true;
2092
- this.unreadCount = result.count;
2093
- this.items = result.items;
2094
- setTimeout(() => { this.newArrival = false; }, 1000);
2095
- }
2096
- });
2086
+ if (this.links && this.links['notifications']) {
2087
+ this.links['notifications'].subscribe(notificationsLink => {
2088
+ this.allNotificationsLink = notificationsLink;
2089
+ });
2090
+ }
2091
+ if (this.notifications) {
2092
+ this.notificationsSub$ = this.notifications?.messages.subscribe(result => {
2093
+ if (result.items) {
2094
+ this.newArrival = true;
2095
+ this.unreadCount = result.count;
2096
+ this.items = result.items;
2097
+ setTimeout(() => { this.newArrival = false; }, 1000);
2098
+ }
2099
+ });
2100
+ }
2097
2101
  }
2098
2102
  doInboxAction() {
2099
2103
  if (this.notifications?.inboxAction) {