We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7b3b826 + 370cc06 commit ad04dbdCopy full SHA for ad04dbd
1 file changed
src/useHoverDirty.ts
@@ -2,9 +2,9 @@ import { RefObject, useEffect, useState } from 'react';
2
import { off, on } from './misc/util';
3
4
// kudos: https://usehooks.com/
5
-const useHoverDirty = (ref: RefObject<Element> | null, enabled: boolean = true) => {
+const useHoverDirty = (ref: RefObject<Element | null>, enabled: boolean = true) => {
6
if (process.env.NODE_ENV === 'development') {
7
- if (ref != null && (typeof ref !== 'object' || typeof ref?.current === 'undefined')) {
+ if (typeof ref !== 'object' || typeof ref?.current === 'undefined') {
8
console.error('useHoverDirty expects a single ref argument.');
9
}
10
0 commit comments