Renamed nullable utils into isDefined and isUndefinedOrNull (#4402)
* Renamed nullable utils into isDefined and isUndefinedOrNull
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
import { useContext } from 'react';
|
||||
|
||||
import { isNullable } from '~/utils/isNullable';
|
||||
import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull';
|
||||
|
||||
import { ScrollWrapperContext } from '../components/ScrollWrapper';
|
||||
|
||||
export const useScrollWrapperScopedRef = () => {
|
||||
const scrollWrapperRef = useContext(ScrollWrapperContext);
|
||||
|
||||
if (isNullable(scrollWrapperRef))
|
||||
if (isUndefinedOrNull(scrollWrapperRef))
|
||||
throw new Error(
|
||||
`Using a scroll ref without a ScrollWrapper : verify that you are using a ScrollWrapper if you intended to do so.`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user