diff --git a/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoRefAccesInRender.ts b/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoRefAccesInRender.ts index 9edb5a859e5cf..b361b2016a1dd 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoRefAccesInRender.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoRefAccesInRender.ts @@ -217,7 +217,7 @@ function joinRefAccessTypes(...types: Array): RefAccessType { } else if (a.kind === 'Guard') { if (b.kind === 'Guard' && a.refId === b.refId) { return a; - } else if (b.kind === 'Nullable') { + } else if (b.kind === 'Nullable' || b.kind === 'Guard') { return {kind: 'None'}; } else { return b;