Skip to content

Commit

Permalink
fix element existence check (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobclyne authored Apr 6, 2024
1 parent 10187c9 commit fba1634
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ export const isVertical = (direction: DrawerDirection) => {
};

export function getTranslate(element: HTMLElement, direction: DrawerDirection): number | null {
if (!element) {
return null;
}
const style = window.getComputedStyle(element);
const transform =
// @ts-ignore
Expand Down

0 comments on commit fba1634

Please sign in to comment.