Skip to content

Commit

Permalink
[DA] Support logical expressions in templates #49
Browse files Browse the repository at this point in the history
  • Loading branch information
alcocerd committed Oct 11, 2019
1 parent 632b0aa commit 33d65d3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rollup-plugins/template-literal-indent-fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 33d65d3

Please sign in to comment.