Skip to content

Commit

Permalink
fix(directive): untranslated keys return the last cumputed value (#1167)
Browse files Browse the repository at this point in the history
This pull request is proposal to fix the following issue
#1164

This produce the same behavior as in v11.0.1, the directive use the current text/value computed by angular change detection when the keys has neither an entry in the translation file for this language, nor in the default language translation file

Fixes #1164
  • Loading branch information
ch-a-bou committed Feb 12, 2020
1 parent 4a8a636 commit 34e8add
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/ngx-translate/core/src/lib/translate.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class TranslateDirective implements AfterViewChecked, OnDestroy {
// we want to use the content as a key, not the translation value
key = trimmedContent;
// the content was changed from the user, we'll use it as a reference if needed
node.originalContent = node.originalContent || content;
node.originalContent = content || node.originalContent;
}
}
}
Expand Down

0 comments on commit 34e8add

Please sign in to comment.