mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
Fix eslint warnings
This commit is contained in:
parent
dd824179f1
commit
72ca818500
35 changed files with 510 additions and 290 deletions
|
|
@ -30,6 +30,21 @@
|
|||
Utils.isNull = _.isNull;
|
||||
Utils.emptyFunction = Utils.noop = function () {};
|
||||
|
||||
/**
|
||||
* @param {Function} callback
|
||||
*/
|
||||
Utils.silentTryCatch = function (callback)
|
||||
{
|
||||
try
|
||||
{
|
||||
callback();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
// eslint-disable-line no-empty
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {*} oValue
|
||||
* @return {boolean}
|
||||
|
|
@ -576,16 +591,17 @@
|
|||
Utils.createCommand = function (oContext, fExecute, fCanExecute)
|
||||
{
|
||||
var
|
||||
fResult = Utils.emptyFunction,
|
||||
fNonEmpty = function () {
|
||||
if (fResult && fResult.canExecute && fResult.canExecute())
|
||||
{
|
||||
fExecute.apply(oContext, Array.prototype.slice.call(arguments));
|
||||
}
|
||||
return false;
|
||||
},
|
||||
fResult = fExecute ? fNonEmpty : Utils.emptyFunction
|
||||
}
|
||||
;
|
||||
|
||||
fResult = fExecute ? fNonEmpty : Utils.emptyFunction;
|
||||
fResult.enabled = ko.observable(true);
|
||||
|
||||
fCanExecute = Utils.isUnd(fCanExecute) ? true : fCanExecute;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue