Skip to content

Commit

Permalink
fix: ensure we pass the corrent data to variable declaration check
Browse files Browse the repository at this point in the history
  • Loading branch information
axe312ger committed Dec 11, 2024
1 parent ba0f8ab commit 772d895
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby/src/utils/babel/babel-plugin-remove-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default declare(function removeApiCalls(
} else {
// if const {x,y} is used, we remove the property
if (
t.isVariableDeclarator(ref.path) &&
t.isVariableDeclarator(ref.path.node) &&
t.isObjectPattern(
(ref.path.parent as t.VariableDeclaration).declarations[0]
.id
Expand Down

0 comments on commit 772d895

Please sign in to comment.