Skip to content

Commit

Permalink
Update ref handling and adjust label component indentation (#17097)
Browse files Browse the repository at this point in the history
* Refactor ref handling and label indentation

- Updated the ref handling condition from Object(ref) === ref to 'current' in ref for improved clarity and accuracy.
- Adjusted the indentation of the label component for consistency and readability.

* chore: run yarn format

---------

Co-authored-by: Taylor Jones <[email protected]>
Co-authored-by: Taylor Jones <[email protected]>
Co-authored-by: Alison Joseph <[email protected]>
  • Loading branch information
4 people authored Oct 23, 2024
1 parent a3bc490 commit 265dc17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const Checkbox = React.forwardRef(
}
if (typeof ref === 'function') {
ref(el);
} else if (ref && Object(ref) === ref) {
} else if (ref && 'current' in ref) {
ref.current = el;
}
}}
Expand Down

0 comments on commit 265dc17

Please sign in to comment.