Renamed nullable utils into isDefined and isUndefinedOrNull (#4402)

* Renamed nullable utils into isDefined and isUndefinedOrNull
This commit is contained in:
Lucas Bordeau
2024-03-11 14:28:57 +01:00
committed by GitHub
parent 3f15cc5b7a
commit 581dfafe11
169 changed files with 469 additions and 493 deletions

View File

@ -8,7 +8,7 @@ import {
beautifyExactDateTime,
beautifyPastDateRelativeToNow,
} from '~/utils/date-utils';
import { isNonNullable } from '~/utils/isNonNullable';
import { isDefined } from '~/utils/isDefined';
type ShowPageSummaryCardProps = {
avatarPlaceholder: string;
@ -86,7 +86,7 @@ export const ShowPageSummaryCard = ({
const inputFileRef = useRef<HTMLInputElement>(null);
const onFileChange = (e: ChangeEvent<HTMLInputElement>) => {
if (isNonNullable(e.target.files)) onUploadPicture?.(e.target.files[0]);
if (isDefined(e.target.files)) onUploadPicture?.(e.target.files[0]);
};
const handleAvatarClick = () => {