Skip to content
This repository was archived by the owner on Nov 4, 2025. It is now read-only.

Commit d17ae97

Browse files
committed
fix: Fix element not exist make points patch
1 parent 7a87ed5 commit d17ae97

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Align.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ const Align: React.RefForwardingComponent<RefAlign, AlignProps> = (
7979
const { activeElement } = document;
8080

8181
// We only align when element is visible
82-
if (element && element.offsetParent) {
83-
result = alignElement(source, element, align);
82+
if (element) {
83+
if (element.offsetParent) {
84+
result = alignElement(source, element, align);
85+
}
8486
} else if (point) {
8587
result = alignPoint(source, point, align);
8688
}

0 commit comments

Comments
 (0)