@sumaris-net/ngx-components 0.28.4 → 0.28.5

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.
@@ -2860,7 +2860,7 @@
2860
2860
  var contextualKeys = this.contextualKeys(key, context);
2861
2861
  // Return the contextual translation, or default of not exists
2862
2862
  return this.translate.get(contextualKeys, interpolateParams)
2863
- .pipe(operators.map(function (translations) { return _this.findFirstValid(contextualKeys, translations) || key; }));
2863
+ .pipe(operators.map(function (translations) { return _this.findFirstValid(contextualKeys, translations); }));
2864
2864
  };
2865
2865
  TranslateContextService.prototype.instant = function (key, context, interpolateParams) {
2866
2866
  // No context: do a normal translate
@@ -2869,7 +2869,7 @@
2869
2869
  // Compute a contextual i18n key, using the context as suffix
2870
2870
  var contextualKeys = this.contextualKeys(key, context);
2871
2871
  var translations = this.translate.instant(contextualKeys, interpolateParams);
2872
- return this.findFirstValid(contextualKeys, translations) || key;
2872
+ return this.findFirstValid(contextualKeys, translations);
2873
2873
  };
2874
2874
  /**
2875
2875
  * Compute contextual i18n keys, using the context as suffix.<br>
@@ -2926,7 +2926,7 @@
2926
2926
  }
2927
2927
  finally { if (e_1) throw e_1.error; }
2928
2928
  }
2929
- return undefined;
2929
+ return translations[keys[keys.length - 1]]; // Return the last keys translation
2930
2930
  };
2931
2931
  return TranslateContextService;
2932
2932
  }());