From 2147078287e623ef4dc708ba39a7e23698d021e8 Mon Sep 17 00:00:00 2001 From: Florian Grolleau Date: Fri, 8 Jan 2021 18:17:10 +0100 Subject: [PATCH] fix(core): prevent infinite update for missing translation --- projects/ngx-translate/core/src/lib/translate.directive.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/ngx-translate/core/src/lib/translate.directive.ts b/projects/ngx-translate/core/src/lib/translate.directive.ts index 542b6940..59e2971c 100644 --- a/projects/ngx-translate/core/src/lib/translate.directive.ts +++ b/projects/ngx-translate/core/src/lib/translate.directive.ts @@ -111,9 +111,9 @@ export class TranslateDirective implements AfterViewChecked, OnDestroy { this.lastParams = this.currentParams; let onTranslation = (res: string) => { - if (res !== key) { - node.lastKey = key; - } + + node.lastKey = key; + if (!node.originalContent) { node.originalContent = this.getContent(node); }