Bugfix for hidden refs (#1418)

This commit is contained in:
Elijah Ahianyo 2023-07-25 16:56:37 +00:00 committed by GitHub
parent 0a25859255
commit 5eeb560238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -383,6 +383,9 @@ export const preventDefault = (event) => {
* @returns The value. * @returns The value.
*/ */
export const getRefValue = (ref) => { export const getRefValue = (ref) => {
if (!ref || !ref.current){
return;
}
if (ref.current.type == "checkbox") { if (ref.current.type == "checkbox") {
return ref.current.checked; return ref.current.checked;
} else { } else {