Fix logical/boolean operators
This commit is contained in:
parent
95ea366ade
commit
070900db8f
|
@ -73,7 +73,11 @@ let trivial = {
|
|||
return defer((node) => {
|
||||
// FIXME: Verify that all the 'operator' values match between Nix and JS!
|
||||
// FIXME: Need to replace this with utility functions to deal with eg. paths
|
||||
return types.binaryExpression(node.operator, node.left, node.right);
|
||||
if (node.operator === "&&" || node.operator === "||") {
|
||||
return types.logicalExpression(node.operator, node.left, node.right);
|
||||
} else {
|
||||
return types.binaryExpression(node.operator, node.left, node.right);
|
||||
}
|
||||
});
|
||||
},
|
||||
NixWithExpression: (node, { defer, setContext, getContextOptional }) => {
|
||||
|
|
Loading…
Reference in a new issue