From 78550c0d1c7037b17bdaa9413351b759b20772c0 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 13 Aug 2023 18:46:16 +0530 Subject: feat: adds conditionals --- src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/index.ts') diff --git a/src/index.ts b/src/index.ts index af8eb23..47e65fe 100644 --- a/src/index.ts +++ b/src/index.ts @@ -210,12 +210,11 @@ export const manageElement = async ( const text = getPropertyValue($element, '--cssx-text') if (text) { - const exprs = parse(text) try { + const exprs = parse(text) $element.textContent = (exprs[0] ? await evalExpr(exprs[0], actions) : text) ?? text } catch (e) { - console.log(e, exprs) $element.textContent = text } } -- cgit v1.3.1