mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Fixed object expression keys transformation when of sequence expressions, when identifier is referenced on the same expression
This commit is contained in:
+6
-5
@@ -7,14 +7,15 @@ import { NO_ADDITIONAL_NODES_PRESET } from '../../src/options/presets/NoCustomNo
|
||||
|
||||
let obfuscatedCode: string = JavaScriptObfuscator.obfuscate(
|
||||
`
|
||||
function foo () {
|
||||
function test() {
|
||||
var foo;
|
||||
var bar;
|
||||
(foo = {foo: 1}), (bar = {bar: foo.foo});
|
||||
return bar.bar;
|
||||
return (foo = {props: 1})['state'] = {
|
||||
expanded: foo.props
|
||||
},
|
||||
foo.state.expanded;
|
||||
}
|
||||
|
||||
console.log(foo());
|
||||
console.log(test());
|
||||
`,
|
||||
{
|
||||
...NO_ADDITIONAL_NODES_PRESET,
|
||||
|
||||
Reference in New Issue
Block a user