Fix a bug where the value of <option> would not get sent if falsy
According to the spec, the value attribute should be sent if it exists, even if it's falsy.
This commit is contained in:
@@ -68,7 +68,7 @@ function parseFormElements(el) {
|
||||
for (var i = 0; i < element.options.length; i++) {
|
||||
opt = element.options[i]
|
||||
if (opt.selected) {
|
||||
values.push(opt.value || opt.text)
|
||||
values.push(opt.hasAttribute("value") ? opt.value : opt.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user