diff --git a/src/app/services/i18n.service.ts b/src/app/services/i18n.service.ts index 38cca7a..b641023 100644 --- a/src/app/services/i18n.service.ts +++ b/src/app/services/i18n.service.ts @@ -75,13 +75,13 @@ export class I18nService { getInternal(key, args: string[], from, path, empty : boolean): string { key += ''; if (!from) { - return empty ? this.empty(key, args, path) : key; + return empty ? this.empty(key, args, path) : (key || ""); } else if (from[ key ]) { if (typeof from[ key ] === 'object') { if (from[ key ][ "." ]) { return this.insertArguments(from[ key ][ "." ], args); } - return empty ? this.empty(key, args, path) : key; + return empty ? this.empty(key, args, path) : (key || ""); } return this.insertArguments(from[ key ], args); } else { @@ -92,7 +92,7 @@ export class I18nService { } } - return empty ? this.empty(key, args, path) : key; + return empty ? this.empty(key, args, path) : (key || ""); } empty(key, args: string[], path: string): string {