Skip to content

Commit e996cae

Browse files
committed
Fix object methods not being traversed anymore
Darn typos!
1 parent 728e676 commit e996cae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/processScript/transform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,12 +741,12 @@ export function transform(
741741
let thisId = reuseDeclaredName ? (parent.id as Identifier).name : `_${evenMoreUniqueId}_THIS_`
742742

743743
let thisIsReferenced = false
744-
if (path.type == `ObjectExpression`) {
744+
if (object.type == `ObjectExpression`) {
745745
for (const property of (object as ObjectExpression).properties) {
746746
if (property.type != `ObjectMethod`)
747747
continue
748748

749-
thisIsReferenced ||= replaceAllThisWith(object, scope, thisId)
749+
thisIsReferenced ||= replaceAllThisWith(property, scope, thisId)
750750
}
751751
} else {
752752
for (const element of (object as ArrayExpression).elements) {

0 commit comments

Comments
 (0)