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 {