Renamed nullable utils into isDefined and isUndefinedOrNull (#4402)
* Renamed nullable utils into isDefined and isUndefinedOrNull
This commit is contained in:
@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user