Skip to content

Commit

Permalink
fix(babel): property key of ClassMethod expected to be (#1033)
Browse files Browse the repository at this point in the history
fixes #1030
  • Loading branch information
Anber committed Jul 31, 2022
1 parent 3c593aa commit 50bc0c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tender-actors-yawn.md
@@ -0,0 +1,5 @@
---
'@linaria/utils': patch
---

Fix for "Property key of ClassMethod expected to be" (fixes #1030)
3 changes: 2 additions & 1 deletion packages/utils/src/scopeHelpers.ts
Expand Up @@ -141,7 +141,8 @@ export function findParentForDelete(path: NodePath): NodePath | null {

if (
parent.isFunctionExpression({ body: path.node }) ||
parent.isObjectMethod()
parent.isObjectMethod() ||
parent.isClassMethod()
) {
return findParentForDelete(parent);
}
Expand Down

0 comments on commit 50bc0c7

Please sign in to comment.