Skip to content

Commit

Permalink
fix for issue #42 (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
echo094 authored Oct 12, 2023
1 parent a6caa03 commit 92f5c72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/plugin/obfuscator.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,12 @@ function unpackCall(path) {
if (!t.isObjectProperty(prop)) {
return
}
let key = prop.key.value
let key
if (t.isIdentifier(prop.key)) {
key = prop.key.name
} else {
key = prop.key.value
}
if (t.isFunctionExpression(prop.value)) {
// 符合要求的函数必须有且仅有一条return语句
if (prop.value.body.body.length !== 1) {
Expand Down

0 comments on commit 92f5c72

Please sign in to comment.