@reforgium/presentia 2.1.0 → 2.1.2

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.
@@ -1452,7 +1452,7 @@ class LangPipe {
1452
1452
  const existing = this.cache.get(key);
1453
1453
  if (existing) {
1454
1454
  if (now - existing.ts < this.ttlMs) {
1455
- return existing.value();
1455
+ return this.applyNamespaceGuard(query, existing.value());
1456
1456
  }
1457
1457
  this.cache.delete(key);
1458
1458
  }
@@ -1460,7 +1460,9 @@ class LangPipe {
1460
1460
  this.cache.set(key, { value: this.lang.observe(query, params ?? undefined), ts: now });
1461
1461
  this.evictIfNeeded();
1462
1462
  }
1463
- const value = this.cache.get(key).value();
1463
+ return this.applyNamespaceGuard(query, this.cache.get(key).value());
1464
+ }
1465
+ applyNamespaceGuard(query, value) {
1464
1466
  const ns = query.split('.', 1)[0];
1465
1467
  if (ns && !this.lang.isNamespaceLoaded(ns)) {
1466
1468
  const placeholder = this.config.placeholder;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.1.0",
2
+ "version": "2.1.2",
3
3
  "name": "@reforgium/presentia",
4
4
  "description": "Angular infrastructure library for i18n, route-aware namespace preload, theming, adaptive breakpoints, route state, and SEO",
5
5
  "author": "rtommievich",
@@ -608,6 +608,7 @@ declare class LangPipe implements PipeTransform {
608
608
  private readonly maxCacheSize;
609
609
  constructor();
610
610
  transform(query: string | null | undefined, params?: LangParams | null): string;
611
+ private applyNamespaceGuard;
611
612
  private makeKey;
612
613
  private evictIfNeeded;
613
614
  private warnUnresolvedKey;