nicolewhite / algebra.js

Build, display, and solve algebraic equations.
http://algebra.js.org
MIT License
1.34k stars 111 forks source link

Error then parsing number with minus sign #80

Open RANUX opened 7 years ago

RANUX commented 7 years ago

I've got strange error then try to parse simple equation:

algebra.parse('(1 - 2 / 1) / -1')

algebra-js.js?hash=2231f8b…:29 Uncaught TypeError: Cannot read property 'terms' of undefined
    at a.convertToFraction (algebra-js.js?hash=2231f8b…:29)
    at a.parseTermRest (algebra-js.js?hash=2231f8b…:29)
    at a.parseTerm (algebra-js.js?hash=2231f8b…:29)
    at a.parseExpr (algebra-js.js?hash=2231f8b…:29)
    at a.parseEqn (algebra-js.js?hash=2231f8b…:29)
    at a.parse (algebra-js.js?hash=2231f8b…:29)
    at Object.a [as parse] (algebra-js.js?hash=2231f8b…:29)
    at <anonymous>:1:9