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

type 'Null' is not a subtype of type 'Function' #30

Open
Ritsz123 opened this issue Aug 22, 2023 · 0 comments
Open

type 'Null' is not a subtype of type 'Function' #30

Ritsz123 opened this issue Aug 22, 2023 · 0 comments

Comments

@Ritsz123
Copy link

var callee = eval(expression.callee, context);

add a null check here.

if value of callee evaluates to null then it throws an exception stating type 'Null' is not a subtype of type 'Function'

as of now i've handled it in our project by explicitly checking callee value in this way


final callee = eval(expression.callee, context);
    if (callee == null) {
      return;
    }
    return evalCallExpression(expression, context);

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

1 participant