Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils/resolveToValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function findScopePath(paths: Array<NodePath>, path: NodePath): ?NodePath {
function findLastAssignedValue(scope, name) {
const results = [];

traverseShallow(scope.path.node, {
traverseShallow(scope.path, {
visitAssignmentExpression: function(path) {
const node = path.node;
// Skip anything that is not an assignment to a variable with the
Expand Down
4 changes: 2 additions & 2 deletions src/utils/traverse.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ type Visitor = (path: NodePath) => any;
* default.
*/
export function traverseShallow(
ast: ASTNode,
path: NodePath,
visitors: { [key: string]: Visitor },
): void {
visit(ast, { ...defaultVisitors, ...visitors });
visit(path, { ...defaultVisitors, ...visitors });
}

const ignore = () => false;
Expand Down