web icon indicating copy to clipboard operation
web copied to clipboard

fix: exception thrown in useMediaQuery when unsupported, add option to disable the hook

Open rawpixel-vincent opened this issue 1 year ago • 1 comments

fix #1580 and add an option to allow the match to be disabled conditionally

add tests 🟢

rawpixel-vincent avatar Jan 04 '25 07:01 rawpixel-vincent

please review the test implementation, I've never used vitest before.

in the test should return undefined and not thrown on unsupported when not enabled: I've verified that the console stub would throw when enabled is true

rawpixel-vincent avatar Jan 04 '25 07:01 rawpixel-vincent