Skip to content

Commit

Permalink
fix: remove n-transform function name ambiguity (#1242)
Browse files Browse the repository at this point in the history
* Add files via upload

N transform function name fix

* Add files via upload

* Update sig.js

* Update sig.js removes n-transform function name ambiguity
  • Loading branch information
gatecrasher777 committed Jul 14, 2023
1 parent 0d3f91b commit e1ebdf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sig.js
Expand Up @@ -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);
Expand Down

0 comments on commit e1ebdf9

Please sign in to comment.