Conversation
|
hm ok so as I was laying in bed last night trying to sleep, I remembered there's a 'removeUnnecessaryParens` that theoretically should solve all these issues, and it's called here https://github.com/socraticorg/mathsteps/blob/master/lib/solveEquation/stepThrough.js#L79 which I think should be before the point where your error comes up? would you mind looking into this and seeing why you were having those problems despite 'removeUnnecessaryParens`? I remember now that we were trying to avoid putting parenthesis code throughout the codebase, we mostly assumed that unnecessary parens just wouldn't be there |
|
Set the value of the param "rootNode" to true can fix it |
|
hey @evykassirer sorry for the delay! will close this PR and address separately |
Follow-up from #250 .
In #250 I updated
isolateSymbolOnLeftSidebut neglected to also updateremoveSymbolFromRightSide.I think because https://github.com/socraticorg/mathsteps/pull/250/files#diff-2dc14e1c8322de958fc4c52d204c30b5R42-R45, the right side (rightly) returns a node with a symbol, but because I didn't modify
removeSymbolFromRightSide, an error was occurring when the right side couldn't handle the parenthesis node.Thanks @evykassirer !