dpnishant / jsprime

a javascript static security analysis tool
http://dpnishant.github.io/jsprime
Other
585 stars 103 forks source link

Engine.js Uncaught TypeError: Mishandled Conditional (Ternary) Operator #6

Closed juk80x closed 10 years ago

juk80x commented 11 years ago

Receiving an Uncaught TypeError on line 200 of engine.js

        var returnValue = real_func_names[j].returns.variables[t].replace("#THIS#", objName[0]);

The reason is that variables[0] is 'undefined'

It is undefined when the return call of a function includes a conditional ternary operator. For example,

return parts[0] === '+' ? -minutes : minutes;

dpnishant commented 10 years ago

Hey juk80x,

Sorry for the delay, I have tried to fix the issue. Can you please check and confirm if the problem is now solved.

Thanks Nishant