Skip to content

Commit 34e8add

Browse files
authored
fix(directive): untranslated keys return the last cumputed value (#1167)
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
1 parent 4a8a636 commit 34e8add

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/ngx-translate/core/src/lib/translate.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class TranslateDirective implements AfterViewChecked, OnDestroy {
8686
// we want to use the content as a key, not the translation value
8787
key = trimmedContent;
8888
// the content was changed from the user, we'll use it as a reference if needed
89-
node.originalContent = node.originalContent || content;
89+
node.originalContent = content || node.originalContent;
9090
}
9191
}
9292
}

0 commit comments

Comments
 (0)