Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
Fix model binding error. Props to @b3n0n. Fixes #531, #404, #256.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Feister committed Feb 16, 2015
1 parent e8caeec commit 0a0bf62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,11 @@
if ($select.multiple){
var resultMultiple = [];
var checkFnMultiple = function(list, value){
if (!list || !list.length) return;
//if the list is empty add the value to the list
if (!list || !list.length){
resultMultiple.unshift(value);

This comment has been minimized.

Copy link
@dimirc

dimirc Mar 12, 2015

Contributor

These changes are the cause of #740

return true;
}
for (var p = list.length - 1; p >= 0; p--) {
locals[$select.parserResult.itemName] = list[p];
result = $select.parserResult.modelMapper(scope, locals);
Expand Down

0 comments on commit 0a0bf62

Please sign in to comment.