Skip to content

Commit

Permalink
[@mantine/hooks] use-media-query: Fix getInitialValueInEffect not w…
Browse files Browse the repository at this point in the history
…orking correctly when initial value is provided (#5575, #5549)
  • Loading branch information
rtivital committed Jan 17, 2024
1 parent 5e01b77 commit 923b8e1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function useMediaQuery(
}
) {
const [matches, setMatches] = useState(
getInitialValueInEffect ? initialValue : getInitialValue(query, initialValue)
getInitialValueInEffect ? initialValue : getInitialValue(query)
);
const queryRef = useRef<MediaQueryList>();

Expand Down

0 comments on commit 923b8e1

Please sign in to comment.