Skip to content

Commit

Permalink
fix(dropdown): add check for el (#1885)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelflips authored and kajabi-bot committed May 10, 2024
1 parent 8ac5a1d commit f07f65c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/sage-react/lib/Dropdown/Dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export const Dropdown = ({
let directionX = null;
let directionY = null;
const el = wrapperRef.current;

// if el is null, return
if (!el) return;

// Elements
const button = el;
const panel = el.lastElementChild;
Expand Down

0 comments on commit f07f65c

Please sign in to comment.