Skip to content

Commit 772d895

Browse files
committed
fix: ensure we pass the corrent data to variable declaration check
1 parent ba0f8ab commit 772d895

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/gatsby/src/utils/babel/babel-plugin-remove-api.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default declare(function removeApiCalls(
5757
} else {
5858
// if const {x,y} is used, we remove the property
5959
if (
60-
t.isVariableDeclarator(ref.path) &&
60+
t.isVariableDeclarator(ref.path.node) &&
6161
t.isObjectPattern(
6262
(ref.path.parent as t.VariableDeclaration).declarations[0]
6363
.id

0 commit comments

Comments
 (0)