summaryrefslogtreecommitdiff
path: root/src/index.ts
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2023-08-13 18:46:16 +0530
committerAkshay Nair <phenax5@gmail.com>2023-08-13 18:56:10 +0530
commit78550c0d1c7037b17bdaa9413351b759b20772c0 (patch)
tree2fbef895d94698ec3ec20fe961493748c1a6f1c0 /src/index.ts
parent2f3de513168ac8a912e4b6540907492437a5f834 (diff)
downloadcss-everything-78550c0d1c7037b17bdaa9413351b759b20772c0.tar.gz
css-everything-78550c0d1c7037b17bdaa9413351b759b20772c0.zip
feat: adds conditionals
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts3
1 files changed, 1 insertions, 2 deletions
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
}
}