Explorar o código

ok button tweaks (work in progress)

miskson %!s(int64=3) %!d(string=hai) anos
pai
achega
4a6ddce12d
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      hw9/script.js

+ 3 - 3
hw9/script.js

@@ -333,14 +333,15 @@ function Form(el, data, okCallback, cancelCallback){
             }
 
             console.log('valid', this.validators.isValid)
+        } catch(e){/*sample text*/}
 
+        try {
             if(Object.values(this.validators.isValid).every((item) => item === true)) {
                 okButton.disabled = false
             } else {
                 okButton.disabled = true
             }
-
-        } catch(e){/*sample text*/}
+        } catch(e) {}
     }
 
     let inputCreators = {
@@ -376,7 +377,6 @@ function Form(el, data, okCallback, cancelCallback){
                     this.checkInfo(input.value, key, {}, input, small)
                 }
             }
-            
             return wrap
         },