Small fixes

This commit is contained in:
RainLoop Team 2014-09-12 19:25:37 +04:00
parent cdf812ae9a
commit 1d309979b8
3 changed files with 15 additions and 11 deletions

View file

@ -848,16 +848,14 @@
Utils.createCommand = function (oContext, fExecute, fCanExecute)
{
var
fResult = fExecute ? function () {
fNonEmpty = function () {
if (fResult && fResult.canExecute && fResult.canExecute())
{
fExecute.apply(oContext, Array.prototype.slice.call(arguments));
}
return false;
} : function () {}
},
fResult = fExecute ? fNonEmpty : Utils.emptyFunction;
;
fResult.enabled = ko.observable(true);