From ac33b1be2700784fb566fbde5e69f5f5eafa9873 Mon Sep 17 00:00:00 2001 From: Justin Ridgewell Date: Fri, 9 Jun 2017 00:12:16 -0400 Subject: [PATCH] Fix addCompletionRecords --- packages/babel-traverse/src/path/family.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-traverse/src/path/family.js b/packages/babel-traverse/src/path/family.js index 612dfd7c1f..e2ab999829 100644 --- a/packages/babel-traverse/src/path/family.js +++ b/packages/babel-traverse/src/path/family.js @@ -26,7 +26,7 @@ export function getCompletionRecords(): Array { } else if (this.isDoExpression() || this.isFor() || this.isWhile()) { paths = addCompletionRecords(this.get("body"), paths); } else if (this.isProgram() || this.isBlockStatement()) { - paths = addCompletionRecords(this.get("body"), paths.pop()); + paths = addCompletionRecords(this.get("body").pop(), paths); } else if (this.isFunction()) { return this.get("body").getCompletionRecords(); } else if (this.isTryStatement()) {