Skip to content

Multiline comments error #795

Description

@zerolx

Hi, recently I wrote some multi line expression in a app that I create and use mathjs, the expressions is similar a this:
That sample here is wrong made, do not generate errors

# comment
# comment
# any expression
1 + 1

That is the right one: (line break detail)

# comment


Then when executed is given the error:

TypeError: Cannot read property 'compile' of undefined

if I put that expressions:

# comment
1 + 1

or that:
1 + 1
or that:
# comment
no error is given, but if i put this:

# comment
# anycomment

the same error appears again, it seems to be a bug in the code so I am reporting

I tested in latest version and happened the same

In console the error appoints to mathjs/lib/expressions/function/eval.js#L44
And is easy to reproduce

Best regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions