Skip to content

Commit

Permalink
Merge pull request #28 from tim-bellette/master
Browse files Browse the repository at this point in the history
Added support for passing boolean values to ko.bindingHandlers.activity
  • Loading branch information
Hans Fjällemark committed Nov 18, 2013
2 parents bc27644 + a099fdf commit 0cd0e7c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions knockout.activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
})(jQuery);


// By: Hans Fjällemark and John Papa
// By: Hans Fj�llemark and John Papa
// https://github.com/CodeSeven/KoLite

;(function($) {
Expand Down Expand Up @@ -374,8 +374,9 @@
},

update: function (element, valueAccessor) {
var activity = valueAccessor()();
var value = ko.utils.unwrapObservable(valueAccessor());
var activity = $.isFunction(value) ? value() : value;
typeof activity !== 'boolean' || $(element).activityEx(activity);
}
};
})(jQuery, ko);
})(jQuery, ko);

0 comments on commit 0cd0e7c

Please sign in to comment.