Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd error message #24

Open
Hax0rG1rl opened this issue Apr 26, 2018 · 1 comment
Open

Odd error message #24

Hax0rG1rl opened this issue Apr 26, 2018 · 1 comment

Comments

@Hax0rG1rl
Copy link

Hi there,

Trying to check a simple JS file I got this error:

/jsprime/jsprime-node/engine.js:1530
            if (node2.argument.name != undefined)
                               ^

TypeError: Cannot read property 'name' of null
    at /jsprime/jsprime-node/engine.js:1530:32
    at traverseMini (/jsprime/jsprime-node/engine.js:84:3)
    at /jsprime/jsprime-node/engine.js:92:13
    at Array.forEach (<anonymous>)
    at traverseMini (/jsprime/jsprime-node/engine.js:91:17)
    at traverseMini (/jsprime/jsprime-node/engine.js:95:11)
    at /jsprime/jsprime-node/engine.js:92:13
    at Array.forEach (<anonymous>)
    at traverseMini (/jsprime/jsprime-node/engine.js:91:17)
    at getFunctions (/jsprime/jsprime-node/engine.js:1527:9)

Any ideas how to solve this?

Regards.

@TejaswiniU
Copy link

I hope by now you would have got the solution
If not
change if (node2.argument.name != undefined)
to if (node2.argument!=undefined & node2.argument.name != undefined)

Reason : By the error msg its simple that when traversing through AST there are cases where the node may have a null argument. Since we are trying for name object it is throwing error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants