diff --git a/compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/InferReactiveScopeVariables.ts b/compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/InferReactiveScopeVariables.ts index f6201c539c..bb2d275dc1 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/InferReactiveScopeVariables.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/InferReactiveScopeVariables.ts @@ -274,12 +274,14 @@ function mayHaveChanged(env: Environment, instruction: Instruction): boolean { case "GetIterator": case "IteratorNext": case "NextPropertyOf": - case "PropertyLoad": case "CallExpression": case "MethodCall": case "NewExpression": { return true; } + case "PropertyLoad": { + return instruction.value.property !== "current" + } case "LoadGlobal": { return ( instruction.value.binding.kind === "ModuleLocal" &&