Skip to content

Commit

Permalink
Merge pull request #229 from reaviz/null-check
Browse files Browse the repository at this point in the history
Add missing null check
  • Loading branch information
SerhiiTsybulskyi authored Jun 12, 2024
2 parents 65f93a8 + ce14a92 commit b7dc64b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/layers/Menu/Menu.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const Unstyled = () => {
};

export const Nested = () => {
const { toggleOpen, ref, Menu: MenuComponent } = useMenu({ open: true });
const { toggleOpen, ref, Menu: MenuComponent } = useMenu({ open: false });
const itemStyle = { padding: 5, borderBottom: 'solid 1px black' };

return (
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Position/usePosition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const usePosition = ({
});

useEffect(() => {
if (isVirtualElement) {
if (isVirtualElement && reference) {
const refObject = reference as ReferenceObject;
refs.setPositionReference({
getBoundingClientRect() {
Expand Down

0 comments on commit b7dc64b

Please sign in to comment.