From 265dc1709b3db1e532540e99af4820f2f031f0af Mon Sep 17 00:00:00 2001 From: Hanbeen Jo <63034887+Hanxbeen@users.noreply.github.com> Date: Thu, 24 Oct 2024 03:11:57 +0900 Subject: [PATCH] Update ref handling and adjust label component indentation (#17097) * 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 Co-authored-by: Taylor Jones Co-authored-by: Alison Joseph --- packages/react/src/components/Checkbox/Checkbox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/components/Checkbox/Checkbox.tsx b/packages/react/src/components/Checkbox/Checkbox.tsx index 5b88fe3135a0..277198c75c99 100644 --- a/packages/react/src/components/Checkbox/Checkbox.tsx +++ b/packages/react/src/components/Checkbox/Checkbox.tsx @@ -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; } }}