Skip to content

Commit 969eca0

Browse files
committed
obfuscator: Exclude other variables when extracting stringArrayCallsWrapper #111
Signed-off-by: echo094 <20028238+echo094@users.noreply.github.com>
1 parent f57e33f commit 969eca0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugin/obfuscator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ function stringArrayV2(ast) {
144144
// v < 2.12.0
145145
// The `stringArrayCallsWrapperName` is defined by VariableDeclarator
146146
up1 = up1.parentPath
147-
const up2 = up1.parentPath
148-
obj.stringArrayCodes.push(generator(up2.node, { minified: true }).code)
147+
const node = t.variableDeclaration('var', [up1.node])
148+
obj.stringArrayCodes.push(generator(node, { minified: true }).code)
149149
up1.node.init = null
150150
obj.stringArrayCalls.push({ name: up1.node.id.name, path: up1 })
151151
continue

0 commit comments

Comments
 (0)