Skip to content

Eval cannot create arrays when used inside a module #109

Description

@jamieparkinson

There is something weird about the behaviour of eval (and indeed new Function()) which I'd appreciate some help with debugging. The following works fine (as in, no errors are thrown):

xst -e "eval('var array = [];')"

But if I have a module with the exact same JS, I get the following error:

Break: ?: call fill: no function!

By 'inside a module' I mean I can get a minimum reproducible example by creating a file main.js containing eval('var array = [];'), a manifest.json which includes this module and also "strip": [], and running mcconfig -d -m -p <whatever> in the cwd.

Any ideas/help?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions