소스 검색

Bugfix for hidden refs (#1418)

Elijah Ahianyo 1 년 전
부모
커밋
5eeb560238
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      reflex/.templates/web/utils/state.js

+ 3 - 0
reflex/.templates/web/utils/state.js

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