Skip to content

Commit

Permalink
fix(deps): AbstractHandler is handling single text node twice TG-206
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCizmar committed Jul 29, 2021
1 parent 7140d7e commit 66c32ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/handlers/AbstractHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ export abstract class AbstractHandler {

protected async handleNodes(nodes: Array<Text | Attr>) {
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);
Expand Down

0 comments on commit 66c32ba

Please sign in to comment.