Skip to content

Commit

Permalink
fix(service) handle non-string keys without throwing (#1021)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanST123 authored Feb 5, 2020
1 parent ef48ea8 commit 6c079e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/ngx-translate/core/src/lib/translate.parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class TranslateDefaultParser extends TranslateParser {
}

getValue(target: any, key: string): any {
let keys = key.split('.');
let keys = typeof key === 'string' ? key.split('.') : [key];
key = '';
do {
key += keys.shift();
Expand Down

0 comments on commit 6c079e2

Please sign in to comment.