relative / synchrony

javascript-obfuscator cleaner & deobfuscator
https://deobfuscate.relative.im/
GNU General Public License v3.0
849 stars 109 forks source link

fix(arraymap): Ignore empty function body #18

Closed mjz19910 closed 2 years ago

mjz19910 commented 2 years ago

If the the BlockStatement is empty after filtering out the empty statements, don't check for a VariableDeclaration at index 0

This shows up in the error log

Caught an error while attempting to run AST visitor!
node = {[snip]}
err = TypeError: Cannot read properties of undefined (reading 'type')
relative commented 2 years ago

thank you for the PR!