Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Apr 2, 2021
1 parent e221458 commit 232af53
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/babel-traverse/src/path/family.ts
Expand Up @@ -260,11 +260,7 @@ export function getCompletionRecords(this: NodePath): NodePath[] {
shouldPopulateBreak: false,
inCaseClause: false,
});
const paths = [];
for (const record of records) {
paths.push(record.path);
}
return paths;
return records.map(r => r.path);
}

export function getSibling(this: NodePath, key: string | number): NodePath {
Expand Down

0 comments on commit 232af53

Please sign in to comment.