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

Commit 0a0bf62

Browse files
author
Brian Feister
committed
Fix model binding error. Props to @b3n0n. Fixes #531, #404, #256.
1 parent e8caeec commit 0a0bf62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: src/select.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,11 @@
973973
if ($select.multiple){
974974
var resultMultiple = [];
975975
var checkFnMultiple = function(list, value){
976-
if (!list || !list.length) return;
976+
//if the list is empty add the value to the list
977+
if (!list || !list.length){
978+
resultMultiple.unshift(value);
979+
return true;
980+
}
977981
for (var p = list.length - 1; p >= 0; p--) {
978982
locals[$select.parserResult.itemName] = list[p];
979983
result = $select.parserResult.modelMapper(scope, locals);

0 commit comments

Comments
 (0)