Roo/form/BasicForm.js
authorAlan Knowles <alan@akbkhome.com>
Mon, 26 Jul 2010 09:17:13 +0000 (17:17 +0800)
committerAlan Knowles <alan@akbkhome.com>
Mon, 26 Jul 2010 09:17:13 +0000 (17:17 +0800)
Roo/form/BasicForm.js

index 758b9db..710a41b 100644 (file)
@@ -406,11 +406,11 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
         this.items.each(function(f){
            f.clearInvalid();
         });
-        if (this.childForms) {
-            Roo.each(this.childForms, function (f) {
-                f.clearInvalid();
-            });
-        }
+        
+        Roo.each(this.childForms || [], function (f) {
+            f.clearInvalid();
+        });
+        
         
         return this;
     },
@@ -423,10 +423,10 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
         this.items.each(function(f){
             f.reset();
         });
-        if (this.childForms) {
-            Roo.each(this.childForms, function (f) {
-                f.reset();
-            });
+        
+        Roo.each(this.childForms || [], function (f) {
+            f.reset();
+        });
         }
         
         return this;