From 2b94b07fdc8f1a82f507b99000add9b7dca2c3d8 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 20 Aug 2023 11:16:52 +0530 Subject: refactor: adds evalvalue type instead of string --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/index.ts') diff --git a/src/index.ts b/src/index.ts index a448924..52f3a1b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import { EvalActions, evalExpr } from './eval' +import { EvalActions, evalExpr, evalExprAsString } from './eval' import { extractDeclaration, DeclarationEval, @@ -274,7 +274,7 @@ export const manageElement = async ( try { const exprs = parse(text) $element.textContent = - (exprs[0] ? await evalExpr(exprs[0], actions) : text) ?? text + (exprs[0] ? await evalExprAsString(exprs[0], actions) : text) ?? text } catch (e) { $element.textContent = text } -- cgit v1.3.1