mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
be41c94e5c
Fixes #30782 When developers do an `if (ref.current == null)` guard for lazy ref initialization, the "safe" blocks should extend up to the if's fallthrough. Previously we only allowed writing to the ref in the if consequent, but this meant that you couldn't use a ternary, logical, etc in the if body.