diff --git a/lib/sig.js b/lib/sig.js index 1eb28b45..eb7bfaa7 100644 --- a/lib/sig.js +++ b/lib/sig.js @@ -56,7 +56,7 @@ exports.extractFunctions = body => { }; const extractNCode = () => { let functionName = utils.between(body, `&&(b=a.get("n"))&&(b=`, `(b)`); - if (functionName.includes('[')) functionName = utils.between(body, `${functionName.split('[')[0]}=[`, `]`); + if (functionName.includes('[')) functionName = utils.between(body, `var ${functionName.split('[')[0]}=[`, `]`); if (functionName && functionName.length) { const functionStart = `${functionName}=function(a)`; const ndx = body.indexOf(functionStart);