File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -123,10 +123,13 @@ function stringArrayV2(ast) {
123
123
return
124
124
}
125
125
const arr = callee . node . params [ 0 ] . name
126
- // const cmpV = callee.node.params[1].name
127
- const fp = `(){try{if()break${ arr } push(${ arr } shift())}catch(){${ arr } push(${ arr } shift())}}`
126
+ const cmpV = callee . node . params [ 1 ] . name
127
+ // >= 2.10.0
128
+ const fp1 = `(){try{if()break${ arr } push(${ arr } shift())}catch(){${ arr } push(${ arr } shift())}}`
129
+ // < 2.10.0
130
+ const fp2 = `const=function(){while(--){${ arr } push(${ arr } shift)}}${ cmpV } `
128
131
const code = '' + callee . get ( 'body' )
129
- if ( ! checkPattern ( code , fp ) ) {
132
+ if ( ! checkPattern ( code , fp1 ) && ! checkPattern ( code , fp2 ) ) {
130
133
return
131
134
}
132
135
obj . stringArrayName = args [ 0 ] . name
You can’t perform that action at this time.
0 commit comments