fix up one use of qsa, verify the length of the returned array when checking for empty.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -214,7 +214,7 @@ | ... | @@ -214,7 +214,7 @@ |
214 | } | 214 | } |
215 | var field = this.findAll('[name="' + name + '"]', form); | 215 | var field = this.findAll('[name="' + name + '"]', form); |
216 | var value = vals[name]; | 216 | var value = vals[name]; |
217 | if (!field) { | 217 | if (!field || field.length === 0) { |
218 | out.errors.push('no field named "' + name + '" in form'); | 218 | out.errors.push('no field named "' + name + '" in form'); |
219 | continue; | 219 | continue; |
220 | } | 220 | } | ... | ... |
-
Please register or sign in to post a comment