Skip to content

Fails to obfuscate with 'static' keyword #939

Description

@datdinhquoc

Expected Behavior

The CLI command and online obfuscator should work well with 'static' keyword in code.

Current Behavior

ES6 has the new 'static' keyword for static properties of class. Command javascript-obfuscator fails with error:
Error: RangeError: Maximum call stack size exceeded

Steps to Reproduce

  1. Create a .js file with an ES6 class inside
  2. Add a static property with 'static' keyword
  3. Run the obfuscator on the file
  4. Error is shown "Error: RangeError: Maximum call stack size exceeded"

Your Environment

WSL

Stack trace

No

Minimal working example that will help to reproduce issue

class MyClass {

    // Static properties
    static myProp = {
        name: "foobar"
    };
}

Activity

  1. sanex3339 commented on Jun 14, 2021

    @sanex3339
    Member

    Duplicate of #909
    Wait until this PR will be merged:
    #916

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