Skip to content

Commit d3b2e07

Browse files
fix: parsing for N transform function name. (#1055)
* Add files via upload N transform function name fix * Add files via upload * Update sig.js
1 parent 198db2f commit d3b2e07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/sig.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ exports.extractFunctions = body => {
5555
}
5656
};
5757
const extractNCode = () => {
58-
const functionName = utils.between(body, `&&(b=a.get("n"))&&(b=`, `(b)`);
58+
let functionName = utils.between(body, `&&(b=a.get("n"))&&(b=`, `(b)`);
59+
if (functionName.includes('[')) functionName = utils.between(body, `${functionName.split('[')[0]}=[`, `]`);
5960
if (functionName && functionName.length) {
6061
const functionStart = `${functionName}=function(a)`;
6162
const ndx = body.indexOf(functionStart);

0 commit comments

Comments
 (0)