[ADF-2328] filtering support for facets and categories (#3293)

* filtering support for facets and categories

* fix tests

* update variable names
This commit is contained in:
Denys Vuika
2018-05-10 14:23:18 +01:00
committed by Eugenio Romano
parent 440c666583
commit 7afcd24488
10 changed files with 344 additions and 34 deletions

View File

@@ -105,4 +105,10 @@ describe('TranslationService', () => {
});
});
it('should return empty string for missing key when getting instant translations', () => {
expect(translationService.instant(null)).toEqual('');
expect(translationService.instant('')).toEqual('');
expect(translationService.instant(undefined)).toEqual('');
});
});

View File

@@ -128,6 +128,6 @@ export class TranslationService {
* @returns Translated text
*/
instant(key: string | Array<string>, interpolateParams?: Object): string | any {
return this.translate.instant(key, interpolateParams);
return key ? this.translate.instant(key, interpolateParams) : '';
}
}