From 31130d5257f253d9be21fe62d668231e27ecbd52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 6 Feb 2023 16:29:10 +0100 Subject: [PATCH] fix(editor): Fix resolvable highlighting for HTML editor (#5379) :bug: Fix resolvable highlighting for HTML editor --- packages/editor-ui/src/mixins/expressionManager.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/editor-ui/src/mixins/expressionManager.ts b/packages/editor-ui/src/mixins/expressionManager.ts index f687cbc17..845afc7f8 100644 --- a/packages/editor-ui/src/mixins/expressionManager.ts +++ b/packages/editor-ui/src/mixins/expressionManager.ts @@ -95,15 +95,15 @@ export const expressionManager = mixins(workflowHelpers).extend({ return rawSegments.reduce((acc, segment) => { const { from, to, text, token } = segment; - if (token === 'Plaintext') { - acc.push({ kind: 'plaintext', from, to, plaintext: text }); + if (token === 'Resolvable') { + const { resolved, error, fullError } = this.resolve(text, this.hoveringItem); + + acc.push({ kind: 'resolvable', from, to, resolvable: text, resolved, error, fullError }); return acc; } - const { resolved, error, fullError } = this.resolve(text, this.hoveringItem); - - acc.push({ kind: 'resolvable', from, to, resolvable: text, resolved, error, fullError }); + acc.push({ kind: 'plaintext', from, to, plaintext: text }); return acc; }, []);