From 33d65d3de9eef58406bcd93f02ed82eda7c83862 Mon Sep 17 00:00:00 2001 From: Daniel Alcocer Date: Fri, 11 Oct 2019 12:57:19 -0700 Subject: [PATCH] [DA] Support logical expressions in templates #49 --- rollup-plugins/template-literal-indent-fix.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rollup-plugins/template-literal-indent-fix.js b/rollup-plugins/template-literal-indent-fix.js index 8654c86..70b0f51 100644 --- a/rollup-plugins/template-literal-indent-fix.js +++ b/rollup-plugins/template-literal-indent-fix.js @@ -53,6 +53,8 @@ function createNewNode(originalNode) { return node.value.raw; case 'Identifier': return '${' + node.name + '}'; + case 'LogicalExpression': + return '${' + node.left.name + node.operator + node.right.raw + '}'; default: return node.value; }