`calculateNecessaryParentheses` blows up cryptically when `getPrecedence` returns null
Open
Needs more information
- Dominant language
- JavaScript
- Stars
- 15.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
I accidentally created a node with the `fn` name `mult` instead of `multiply` i.e. `new OperatorNode('*', 'mult', [...])`, and when I went to tex-ify it I got the error `Cannot read property 'OperatorNode:mult' of undefined` which I found quite cryptic and took quite a bit of digging to figure out.
Is there a reason why `getPrecedence` returns `null` instead of throwing an error when precedence can't be determined? If so what would you recommend as a fix, if not could I change that?
Contributor guide
Assessment
This issue has not been assessed yet.