Skip to content

Commit 70eeb92

Browse files
committed
chore: support nodejs v4
1 parent 11e42ba commit 70eeb92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: lib/util/variable.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ function variablesInScope(context, node) {
6262
* @param {string} name The name of the variable to search.
6363
* @returns {ASTNode|null} Return null if the variable could not be found, ASTNode otherwise.
6464
*/
65-
function findVariableByName(context, node, name = node.name) {
66-
const variable = getVariable(variablesInScope(context, node), name);
65+
function findVariableByName(context, node, name) {
66+
const variable = getVariable(variablesInScope(context, node), name || node.name);
6767

6868
if (!variable || !variable.defs[0] || !variable.defs[0].node) {
6969
return null;

0 commit comments

Comments
 (0)