google / mathsteps

Step by step math solutions for everyone
https://socratic.org
Apache License 2.0
2.12k stars 274 forks source link

fixing a bug in nth root terms multiplication #193

Closed ldworkin closed 7 years ago

ldworkin commented 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.

Instead of node.args[1] we should always use getRootNode(node).

ldworkin commented 7 years ago

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!

evykassirer commented 7 years ago

awesome fix! ✨