Commit e61e25be authored by David Stutz's avatar David Stutz

Merge pull request #196 from deniss-s/master

Fixed bug when no options binding is given
parents 17d95cfd 6ec0ede0
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
update: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { update: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {
var config = ko.utils.unwrapObservable(valueAccessor()); var config = ko.utils.unwrapObservable(valueAccessor());
var selectOptions = allBindingsAccessor().options(); var selectOptions = allBindingsAccessor().options;
var ms = $(element).data('multiselect'); var ms = $(element).data('multiselect');
if (!ms) { if (!ms) {
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
} }
else { else {
ms.updateOriginalOptions(); ms.updateOriginalOptions();
if (selectOptions && selectOptions.length !== ms.originalOptions.length) { if (selectOptions && selectOptions().length !== ms.originalOptions.length) {
$(element).multiselect('rebuild'); $(element).multiselect('rebuild');
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment