Skip to content

Commit e187271

Browse files
committed
Don't pass env to validator
1 parent 2ce8e3a commit e187271

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ function runWithEnvironment(
309309
env.config.validateExhaustiveEffectDependencies
310310
) {
311311
// NOTE: this relies on reactivity inference running first
312-
validateExhaustiveDependencies(hir, env).unwrap();
312+
validateExhaustiveDependencies(hir).unwrap();
313313
}
314314
}
315315

compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateExhaustiveDependencies.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
areEqualPaths,
1919
BlockId,
2020
DependencyPath,
21-
Environment,
2221
FinishMemoize,
2322
GeneratedSource,
2423
HIRFunction,
@@ -89,8 +88,8 @@ const DEBUG = false;
8988
*/
9089
export function validateExhaustiveDependencies(
9190
fn: HIRFunction,
92-
env: Environment,
9391
): Result<void, CompilerError> {
92+
const env = fn.env;
9493
const reactive = collectReactiveIdentifiersHIR(fn);
9594

9695
const temporaries: Map<IdentifierId, Temporary> = new Map();

0 commit comments

Comments
 (0)