Closed ldworkin closed 7 years ago
The previous code would error if you left out the root node, i.g. nthRoot(x, 2) * nthRoot(x, 2) worked but nthRoot(x) * nthRoot(x) didn't.
nthRoot(x, 2) * nthRoot(x, 2)
nthRoot(x) * nthRoot(x)
Instead of node.args[1] we should always use getRootNode(node).
node.args[1]
getRootNode(node)
Going to merge this guys, cause I want to update Athena and I don't want to pull in broken code. Happy to make changes afterwards though!
awesome fix! ✨
The previous code would error if you left out the root node, i.g.
nthRoot(x, 2) * nthRoot(x, 2)
worked butnthRoot(x) * nthRoot(x)
didn't.Instead of
node.args[1]
we should always usegetRootNode(node)
.