diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2015-11-04 18:34:14 -0500 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2015-11-05 17:41:49 -0500 |
commit | 79fc806e8500372a2278795c068d039ee287535f (patch) | |
tree | 8854f780b465d1fdabcdc98c83ca2327a6f79144 /src | |
parent | e05c63e17a037d550e7dde5d805ee5c4214ee44b (diff) | |
download | jquery-79fc806e8500372a2278795c068d039ee287535f.tar.gz jquery-79fc806e8500372a2278795c068d039ee287535f.zip |
Attributes: return empty array for select-multiple with no values
Fixes gh-2562
Close gh-2689
Diffstat (limited to 'src')
-rw-r--r-- | src/attributes/val.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/attributes/val.js b/src/attributes/val.js index caf0126d4..5f0b73e00 100644 --- a/src/attributes/val.js +++ b/src/attributes/val.js @@ -90,7 +90,7 @@ jQuery.extend( { var value, option, options = elem.options, index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, + one = elem.type === "select-one", values = one ? null : [], max = one ? index + 1 : options.length, i = index < 0 ? |