Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/useHoverDirty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { RefObject, useEffect, useState } from 'react';
import { off, on } from './misc/util';

// kudos: https://usehooks.com/
const useHoverDirty = (ref: RefObject<Element> | null, enabled: boolean = true) => {
const useHoverDirty = (ref: RefObject<Element | null>, enabled: boolean = true) => {
if (process.env.NODE_ENV === 'development') {
if (ref != null && (typeof ref !== 'object' || typeof ref?.current === 'undefined')) {
if (typeof ref !== 'object' || typeof ref?.current === 'undefined') {
console.error('useHoverDirty expects a single ref argument.');
}
}
Expand Down
Loading