Skip to content

Commit

Permalink
fix: Fix error when compiling with electron (#647)
Browse files Browse the repository at this point in the history
* Fixes #645: Unexpected token: punc () in sig.js

* Attempt to avoid lint requirement for trailing comma
  • Loading branch information
digimezzo committed Jun 4, 2020
1 parent d857bb5 commit 519aa07
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/sig.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,14 @@ const actionsObjRegexp = new RegExp(
jsKeyStr}${sliceStr}|${
jsKeyStr}${spliceStr}|${
jsKeyStr}${swapStr
}),?\\r?\\n?)+)\\};`,
);
}),?\\r?\\n?)+)\\};`);
const actionsFuncRegexp = new RegExp(`${`function(?: ${jsVarStr})?\\(a\\)\\{` +
`a=a\\.split\\(${jsEmptyStr}\\);\\s*` +
`((?:(?:a=)?${jsVarStr}`}${
jsPropStr
}\\(a,\\d+\\);)+)` +
`return a\\.join\\(${jsEmptyStr}\\)` +
`\\}`,
);
`\\}`);
const reverseRegexp = new RegExp(`(?:^|,)(${jsKeyStr})${reverseStr}`, 'm');
const sliceRegexp = new RegExp(`(?:^|,)(${jsKeyStr})${sliceStr}`, 'm');
const spliceRegexp = new RegExp(`(?:^|,)(${jsKeyStr})${spliceStr}`, 'm');
Expand Down

0 comments on commit 519aa07

Please sign in to comment.