From 79fc806e8500372a2278795c068d039ee287535f Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Wed, 4 Nov 2015 18:34:14 -0500 Subject: Attributes: return empty array for select-multiple with no values Fixes gh-2562 Close gh-2689 --- src/attributes/val.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/attributes') 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 ? -- cgit v1.2.3