Skip to content

Commit cb8b8fe

Browse files
authored
Fix variable name typo. NFC (#18225)
Because of a typo, the `names` variable was unused, and instead all assignments to `name` were changing the global `name` property.
1 parent 8eaf19f commit cb8b8fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parseTools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ function modifyFunction(text, func) {
854854
// Match a function with a name.
855855
let match = text.match(/^\s*(async\s+)?function\s+([^(]*)?\s*\(([^)]*)\)/);
856856
let async_;
857-
let names;
857+
let name;
858858
let args;
859859
let rest;
860860
if (match) {

0 commit comments

Comments
 (0)