Commit 0d50d4fb 0d50d4fb088ac4c2bb825828fdd912c30c0045e0 by Luke Rodgers

Prevent superfluous processing of already-processed form fields.

Since casper already handles fields with the same name (checkbox, radio)
in `getFieldValue`, we shouldn't process already-processed form fields
again in the main loop of `getFormValues`.
1 parent 27440007
...@@ -511,7 +511,7 @@ ...@@ -511,7 +511,7 @@
511 var self = this; 511 var self = this;
512 [].forEach.call(form.elements, function(element) { 512 [].forEach.call(form.elements, function(element) {
513 var name = element.getAttribute('name'); 513 var name = element.getAttribute('name');
514 if (name) { 514 if (name && !values[name]) {
515 values[name] = self.getFieldValue(name); 515 values[name] = self.getFieldValue(name);
516 } 516 }
517 }); 517 });
......