Skip to content

Commit

Permalink
fix jsdom matchMedia
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank99 committed Mar 26, 2024
1 parent 47a7533 commit 4c84e49
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getWindow } from '../functions/dom.js';

export const useMediaQuery = (queryString: string) => {
const [getSnapshot, subscribe] = React.useMemo(() => {
const mediaQueryList = getWindow()?.matchMedia(queryString);
const mediaQueryList = getWindow()?.matchMedia?.(queryString);

return [
() => mediaQueryList?.matches,
Expand Down

0 comments on commit 4c84e49

Please sign in to comment.