MichaelXF / js-confuser

JS-Confuser is a JavaScript obfuscation tool to make your programs *impossible* to read.
https://js-confuser.com
MIT License
196 stars 31 forks source link

invalid generated js for `(a ?? {}) && ""` #51

Open Le0Developer opened 1 year ago

Le0Developer commented 1 year ago

Describe the bug:

Compiles invalid JS

Config and Small code sample

Config:

{
  target: "node",
  preset: "high"
}

Code:

(a ?? {}) && ""

Expected behavior

Compiles to (a??{})&&''

Actual behavior

Compiles to a??{}&&'' which is invalid.

MichaelXF commented 1 year ago

I believe this error has to do with escodegen or acorn, not with the obfuscator itself. I don't know how to fix this.