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`.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -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 | }); | ... | ... |
-
Please register or sign in to post a comment