Permalink
Browse files

Additional fix for #20. Do a deep copy of the global options, so we d…

…o not start modifying the ko.bindingHandlers.sortable.options object.
  • Loading branch information...
1 parent 91e57ae commit 100d390c5028c2abccae1dabc8bcca8d3ad472b0 @rniemeyer committed May 23, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 build/knockout-sortable.js
  2. +2 −2 build/knockout-sortable.min.js
  3. +1 −1 src/knockout-sortable.js
@@ -65,7 +65,7 @@ ko.bindingHandlers.sortable = {
});
//build a new object that has the global options with overrides from the binding
- ko.utils.extend(sortable, ko.bindingHandlers.sortable);
+ $.extend(true, sortable, ko.bindingHandlers.sortable);
if (value.options && sortable.options) {
ko.utils.extend(sortable.options, value.options);
delete value.options;
Oops, something went wrong.
View
@@ -65,7 +65,7 @@ ko.bindingHandlers.sortable = {
});
//build a new object that has the global options with overrides from the binding
- ko.utils.extend(sortable, ko.bindingHandlers.sortable);
+ $.extend(true, sortable, ko.bindingHandlers.sortable);
if (value.options && sortable.options) {
ko.utils.extend(sortable.options, value.options);
delete value.options;

0 comments on commit 100d390

Please sign in to comment.