@acorex/platform 19.3.0-next.0 → 19.3.0-next.1

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.
@@ -1,4 +1,4 @@
1
- import { Signal } from "@angular/core";
1
+ import { Signal } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class AXPTaskBadgeService {
4
4
  private badgeMap;
@@ -2615,7 +2615,7 @@ class AXPTaskBadgeProvider {
2615
2615
  class AXPTaskBadgeService {
2616
2616
  constructor() {
2617
2617
  this.badgeMap = new Map();
2618
- this.providers = inject(AXP_TASK_BADGE_PROVIDERS);
2618
+ this.providers = inject(AXP_TASK_BADGE_PROVIDERS, { optional: true }) ?? [];
2619
2619
  this.computedCache = new Map();
2620
2620
  for (const provider of this.providers) {
2621
2621
  if (!this.badgeMap.has(provider.key)) {
@@ -2629,9 +2629,7 @@ class AXPTaskBadgeService {
2629
2629
  return this.computedCache.get(key);
2630
2630
  }
2631
2631
  const signals = this.badgeMap.get(key) ?? [];
2632
- const total = signals.length > 0
2633
- ? computed(() => signals.reduce((sum, s) => sum + s(), 0))
2634
- : signal(0);
2632
+ const total = signals.length > 0 ? computed(() => signals.reduce((sum, s) => sum + s(), 0)) : signal(0);
2635
2633
  this.computedCache.set(key, total);
2636
2634
  return total;
2637
2635
  }