Skip to content

Commit

Permalink
Fix tests and limit to constants for function traversing
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchi committed Nov 30, 2018
1 parent 8fb9006 commit 33beb4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks.macro.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function visitInputsReferences(parentPath, entryPath, babel, visitor) {
}

// Traverse only “constant” function references (as in “never re-assigned”)
if (isFunction(t, binding.path)) {
if (binding.constant && isFunction(t, binding.path)) {
visitInputsReferences(parentPath, binding.path, babel, visitor);
return;
}
Expand Down

0 comments on commit 33beb4b

Please sign in to comment.