From 66c32bafcf776c41a535a36207d52ec83de18be4 Mon Sep 17 00:00:00 2001 From: Jan Cizmar Date: Thu, 29 Jul 2021 18:55:01 +0200 Subject: [PATCH] fix(deps): AbstractHandler is handling single text node twice TG-206 --- packages/core/src/handlers/AbstractHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/handlers/AbstractHandler.ts b/packages/core/src/handlers/AbstractHandler.ts index 72d8aac51b..5f2e275a30 100644 --- a/packages/core/src/handlers/AbstractHandler.ts +++ b/packages/core/src/handlers/AbstractHandler.ts @@ -49,11 +49,11 @@ export abstract class AbstractHandler { protected async handleNodes(nodes: Array) { for (const textNode of nodes) { + const result = await this.textService.replace(textNode.textContent); const tolgeeData = textNode[TOLGEE_ATTRIBUTE_NAME] as | NodeMeta | undefined; if (tolgeeData?.oldTextContent == undefined) { - const result = await this.textService.replace(textNode.textContent); if (result) { const { text, keys } = result; const translatedNode = this.translateChildNode(textNode, text, keys);